Title: Visual editor stripping certain link
Last modified: April 12, 2018

---

# Visual editor stripping certain link

 *  [clintemsley](https://wordpress.org/support/users/clintemsley/)
 * (@clintemsley)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/visual-editor-stripping-certain-link/)
 * Hi there!
 * I imported a bunch of pages from our own proprietary system into WordPress a 
   while ago. I was able to grab all of the HTML, fix it up a little bit, then put
   it into new posts.
 * The problem that I’m just now noticing is that the visual editor is stripping
   a specific type of link. The link works just fine, and as long as I don’t edit
   the post it remains there.
 * For example, the below HTML exists on a post:
 * `<strong>FINAL WORD </strong><br>Arc flashes are dangerous. Death from their 
   injuries is a real possibility.</p><p><a href="/wp-content/uploads/safety-talks/
   ppt/T1708-04.pps"> <h2>Click to Download Powerpoint</h2> </a></p><p><h2> Leader
   Guide:</h2> </p><p>[pdf-embedder url="/wp-content/uploads/safety-talks/leader/
   LeaderGuide_13568_Avoid Arc Flash.pdf"]</p><p><h2>Quiz:</h2></p><p>[pdf-embedder
   url="/wp-content/uploads/safety-talks/quiz/Quiz_13569_Avoid Arc Flash.pdf"]</
   p>`
 * And I can see it in the text editor just fine! It’s ugly but it works. But as
   soon as I go to the visual editor, then back to text, it looks like this:
 *     ```
       <strong>FINAL WORD </strong>
       Arc flashes are dangerous. Death from their injuries is a real possibility.
       <h2>Click to Download Powerpoint</h2>
       <h2>Leader Guide:</h2>
       [pdf-embedder url="/wp-content/uploads/safety-talks/leader/LeaderGuide_13568_Avoid Arc Flash.pdf"]
       <h2>Quiz:</h2>
       [pdf-embedder url="/wp-content/uploads/safety-talks/quiz/Quiz_13569_Avoid Arc Flash.pdf"]
       ```
   
 * As you can see, the link to download the PowerPoint is now just gone. This doesn’t
   happen with other links, seemingly, just that kind.
 * Now, I did try a trick I found elsewhere, but it doesn’t seem to work. Here’s
   where I found it: [https://patrickcoombe.com/fix-wordpress-strips-code-switching-visual-editor/](https://patrickcoombe.com/fix-wordpress-strips-code-switching-visual-editor/)
 * I put the code at the bottom of the functions.php file but it hasn’t affected
   anything.
 * It seems bizarre to me that the TinyMCE editor would strip something as benign
   as a link. I really can’t understand what it’s doing or why. Can somebody help
   me fix this?
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fvisual-editor-stripping-certain-link%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 1 replies (of 1 total)

 *  [helldog2018](https://wordpress.org/support/users/helldog2018/)
 * (@helldog2018)
 * [8 years, 1 month ago](https://wordpress.org/support/topic/visual-editor-stripping-certain-link/#post-10176608)
 * Hi [@clintemsley](https://wordpress.org/support/users/clintemsley/),
 * It seems TinyMCE is doing this out of security reasons.
    Take a look at the following
   [Guide](https://www.tinymce.com/docs/configure/url-handling/#allow_script_urls),
   you can probably find your answer here.
 * Let me know if this fixed your issue.

Viewing 1 replies (of 1 total)

The topic ‘Visual editor stripping certain link’ is closed to new replies.

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 1 reply
 * 2 participants
 * Last reply from: [helldog2018](https://wordpress.org/support/users/helldog2018/)
 * Last activity: [8 years, 1 month ago](https://wordpress.org/support/topic/visual-editor-stripping-certain-link/#post-10176608)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
