WordPress is modifying my code
-
WordPress is modifying code that I enter in text mode. I have repeatedly copied and pasted flawless code that I wrote in TextEdit for a series of hyperlinks. When I update the post, an extra ” character is added at the end of the hyperlink and the “http:” in the beginning of the URLs are deleted. Does anyone know how to alleviate this issue?
The blog I need help with is: (visible only to logged in users)
-
-
-
Hey there! Assuming your code is just hyperlinks and not things like javascript or iframes (which are not allowed on WordPress.com) then it might just be formatting code coming through when you paste.
You can try this, in TextEdit, select “make plain text” from the format menu prior to copying your text.
If that’s not working, check out this support document to make sure you aren’t pasting any disallowed code in there: https://en.support.wordpress.com/code/
-
Update on this, I replaced the quotation marks in my code with the character code and that alleviated the issue of WordPress’ Auto Correct adding the extra quotation mark around the URL. However, WordPress is still removing the “http:” from my URLs when I save the draft. Here is the code I am pasting into the text view:
~The Squeeze: $2 entry, $15k to first, $175k in prizes!~
And here is what I see in text view after I save, and of course, the hyperlinks don’t work:
-
I always make sure I am in plain text mode when I am writing code. All I’m trying to do is write the code for hyperlinks once so I can copy and paste in future uses, as I will be using them quite frequently. The links work if I go back in after the initial save and re-add the “http:” into each link, but that defeats the purpose of the shortcut.
-
Let’s try that again, here is the code that I have written and pasted into WordPress
-
Actually, that’s a prime example of what happens to the code when I hit Save. You will notice that the http: is missing and the curly quotation mark is added. Any idea of how to get WordPress to stop “correcting” my code?
-
The code is wrong. Note the double apostrophes at the end
href="//partners.fanduel.com/processing/clickthrgh.asp?btag=a_3956b_621”"and the wrong URL:
href="//partners.fanduel.com -
Just to double check, you are pasting this into text mode in the WordPress.com editor and not the visual editor tab, correct?
-
When I enter the code, it’s correct. That’s what WordPress changes it to after I save my post
-
-
Try with this code:
<a href="http://partners.fanduel.com/processing/clickthrgh.asp?btag=a_3956b_621">Grand Slam: $25 entry, $30,000 to first, $300k in prizes!</a>And beware about ads on WordPress.com:
https://en.support.wordpress.com/advertising/ -
Galois, that is EXACTLY what I enter into the text view. The bad code is what WordPress changes it to after I save the post
-
The bad code is what WordPress changes it to after I save the post
My last response:
And beware about ads on WordPress.com:
https://en.support.wordpress.com/advertising/
- The topic ‘WordPress is modifying my code’ is closed to new replies.