URL not maintained in TinyMCE Link when URL matches website URL
I am fighting an issue with relative URL's that are entered using TinyMCE.
I am trying to enter a link for http://www.domainname.com. I type http://www.domainname.com in the content area, highlight it and choose link button and enter "http://www.domainname.com" in the URL field. Click Ok and it all looks fine. Even looking at the HTML option in TinyMCE it properly shows:
As soon as you hit Save or Save and Publish it is transformed into a "/" or a blank.
<p><a href="/">/</a></p>
or
<p> </p>
This is a problem I can't figure out how to get around. I have tried updating TinyMCE settings - but it does not look to be a TinyMCE issue as it is happen only when the Save event is executed.
These are some of the settings I have played with:
<config key="relative_urls">false</config>
<config key="convert_urls">false</config>
useDomainPrefixes set to true
I am more concerned about the text area being replaced. I can understand Umbraco changing the value of the href attribute, but not the <a> value.
Example, if I use <p><a href="http://www.domainname.com">www.domainname.com</a></p> without the http:// it leaves the <a> value alone - <p><a>locahost:89</a></p> but the href attribute is incorrect.
Is there any other settings out there - or any known work arounds? Seems like a bug to me - but all discussions I can find on the web are left unanswered.
I appreciate the quick reply. I do have the hostname set. I even stood up a clean 6.0 version on http://localhost with blank template just rule out non-default configs and anything in the template being the cause. I tested in IIS 6.0 and 7.5 just rule that out as well. Very wierd.
URL not maintained in TinyMCE Link when URL matches website URL
I am fighting an issue with relative URL's that are entered using TinyMCE.
I am trying to enter a link for http://www.domainname.com. I type http://www.domainname.com in the content area, highlight it and choose link button and enter "http://www.domainname.com" in the URL field. Click Ok and it all looks fine. Even looking at the HTML option in TinyMCE it properly shows:
<p><a href="http://www.domainname.com">http://www.domainname.com</a></p>;
As soon as you hit Save or Save and Publish it is transformed into a "/" or a blank.
<p><a href="/">/</a></p>
or
<p> </p>
This is a problem I can't figure out how to get around. I have tried updating TinyMCE settings - but it does not look to be a TinyMCE issue as it is happen only when the Save event is executed.
These are some of the settings I have played with:
<config key="relative_urls">false</config>
<config key="convert_urls">false</config>
useDomainPrefixes set to true
I am more concerned about the text area being replaced. I can understand Umbraco changing the value of the href attribute, but not the <a> value.
Example, if I use <p><a href="http://www.domainname.com">www.domainname.com</a></p> without the http:// it leaves the <a> value alone - <p><a>locahost:89</a></p> but the href attribute is incorrect.
Is there any other settings out there - or any known work arounds? Seems like a bug to me - but all discussions I can find on the web are left unanswered.
I need the link to stay as <a href="http://www.domainname.com">http://www.domainname.com</a>; or worst case as <a href="/">http://www.domainname.com</a>;.
I am using version 6.0, also can confirm the same exact behavior in version 4.6 as well.
Hi Adam
That's a really weird issue.
First thing that comes to my mind is if you have setup the hostname of the website in Umbraco?
Looking forward to hearing from you.
/Jan
Jan,
I appreciate the quick reply. I do have the hostname set. I even stood up a clean 6.0 version on http://localhost with blank template just rule out non-default configs and anything in the template being the cause. I tested in IIS 6.0 and 7.5 just rule that out as well. Very wierd.
Any suggestion you may have will be most helpful!
Thank you,
Adam
Hi Adam
Hmm, is it an option to try and upgrade to 6.0.3? Not sure but perhaps this could be a bug.
/Jan
Jan,
I updated to 6.0.3 build 22 (3/25/2013 3:24PM).
Same issue although TinyMCE did not strip the text in the <a> tag, but did strip the href attribute. Clicking save or publish strips it all out.
So entering in:
<p><a href="http://www.domainname.com">http://www.domainname.com</a></p>;
Clicking update in the TinyMCE editot makes it:
<p><a>http://www.domainname.com</a></p>;
Clicking Save or Publish makes it:
<p> </p>
This is on a clean 6.0.3 install and the hostname is set.
Any other ideas?
Thank you,
Adam
is working on a reply...