• 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/

    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 to see the link]

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

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