BlogEngine - Mangling of HTML Anchor Links in TinyMCE Editor
Posted
by
IrishChieftain
on Stack Overflow
See other posts from Stack Overflow
or by IrishChieftain
Published on 2012-09-22T14:53:22Z
Indexed on
2012/09/22
15:37 UTC
Read the original article
Hit count: 319
When I create the following link:
<a href="~/Contact.aspx" runat="server">Contact us</a>
The editor strips out the runat attribute, breaking the link. It's also inserting "/page" into the URL which I do not want to happen. Is there some editor setting to prevent this from happening? I've checked here and couldn't find an answer.
UPDATE
I've added the following to tinyMCE.acsx to allow the addition of the runat attribute to anchor links:
tinyMCE.init({ ... extended_valid_elements : "a[href|runat=server]" ... });
This solves the problem with the runat attribute being stripped out. My only remaining problem is the automatic insertion of "page" in the URL. Anybody?
© Stack Overflow or respective owner