WordPress inserts unwanted code in links
-
WordPress keeps putting the code “https://href.li/?” in front of the URL in a link that I try to enter. It doesn’t do this with other links I’ve created. The URL in question is
http://www.lemonde.fr/societe/article/2014/11/15/attentat-de-la-rue-copernic-hassan-diab-est-arrive-en-france_4524052_3224.html
How do I prevent this?The blog I need help with is: (visible only to logged in users)
-
That https://href.li/ means the blog is private ie. your are copying and pasting a link found in private blog.
-
My blog is private for the moment while I’m creating it, but the links I want to create have URLs from newspaper and other organization’s sites that seem to be publicly accessible, not private. Does this mean WordPress prohibits links to outside sites if your blog is private?
-
No. It means stop copying and pasting the link with the href.li and use only the http:// when creating links.
This is the guide for creating links in posts and pages: http://en.support.wordpress.com/links/
This is the general link model:
<a href="URL HERE">Highlighted anchor text here</a>
This is the visual result – it’s not actually linked here in the forum.
Highlighted anchor text here1. Enter the relevant descriptive anchor text you want to link to first. Note that “here” is not a good choice.
2. Then use your mouse to highlight that anchor text. (If you don’t highlight the anchor text the chain icon will remain grayed out and not be useable.)
3. Next click the chain icon in the editor and proceed to create the link. -
I didn’t paste any links with href.li in them. I started using the visual editor and then switched to the text editor when this happened. At no time did I insert a url that had href.li in it. Wordperfect inserted it on its own. I tried leaving the default “http://” in the link input box and only pasting the part of the external url after its “http://” and got the same problem, i.e. Wordperfect added href.li to my links.
At any rate, I’ve clicked on the link visibility line in the reading settings and this gets rid of the problem.
Thanks for letting me know href.li is related to privacy. I would never have figured out a work-around without that tip.
-
-
Well my problem is resolved so yes. I think someone at WordPress might want to know why their software inserts code on its own into links that aren’t wanted, or at the least create a help answer with the key word “href.li” so anyone else setting up a private site knows their public links from public sites won’t work. I changed the topic resolved box to resolved.
-
I know why.
Because you pasted in the link with its http:// without removing the one that was already there. So your link turned out to be http://http://whatever.com. So, always delete the pre-existing http first.
-
No. I deleted the automatic “http://” and pasted my link with its own “http://” and I also tried leaving the automatic “http://” and pasting my lnk without it. Both resulted in WordPress inserting “href.li” in between their and/or my “http://”. Switching to the text editor in both situatations showed only one “http://” in the link code. I never saw a link with “http://http://whatever.com” but rather
“https://href.li/whatever.com” after I saved the page. That’s why to me it looks like WordPress inserts the “href.li” itself for some reason.
- The topic ‘WordPress inserts unwanted code in links’ is closed to new replies.