I have entered the below lines of code in the CKEditor Source mode,
But it displays the following output in the CKEditor Designer,
Correct Method
Correct Method
">Wrong Method
">Wrong Method
'>Wrong Method
CKEditor adds special characters for the three wrong input combinations.
Is there any way to fix this issue?
<a href="<%=GetProductUrl('SBB035')%>">Correct Method</a><br> <a href='<%=GetProductUrl("SBB035")%>'>Correct Method</a><br> <a href="<%=GetProductUrl("SBB035")%>">Wrong Method</a><br> <a href="<%=GetProductUrl("")%>">Wrong Method</a><br> <a href='<%=GetProductUrl('SBB035')%>'>Wrong Method</a><br>
But it displays the following output in the CKEditor Designer,
Correct Method
Correct Method
">Wrong Method
">Wrong Method
'>Wrong Method
CKEditor adds special characters for the three wrong input combinations.
Is there any way to fix this issue?
Re: Added special characters - switching from Source to Desi
Re: Added special characters - switching from Source to Desi
Thanks in Advance
By
Sivaram
Re: Added special characters - switching from Source to Desi
am using the following code in the CK editior source mode,
<a href="<%=GetProductUrl('SBB035')%>">Correct Method</a><br />
<a href='<%=GetProductUrl("SBB035")%>'>Correct Method</a><br />
<a href="<%=GetProductUrl("SBB035")%>">Wrong Method</a><br />
<a href="<%=GetProductUrl("")%>">Wrong Method</a><br />
<a href='<%=GetProductUrl('SBB035')%>'>Wrong Method</a><br />
and am using the ProtectedSource in the config.js file as
config.protectedSource.push(/[^<]*<%([^<]+)%>/g);
config.protectedSource.push(/[<a]([^<]+)>([^<]+)<\/a>/g);
In designer file it displays only the "<" ( less than symbol)
<
<
<
<
<
After coming back the source mode it displaying as
<a href="<%=GetProductUrl('SBB035')%>">Correct Method</a><br />
<a href='<%=GetProductUrl("SBB035")%>'>Correct Method</a><br />
<a href="<%=GetProductUrl("SBB035")%>">Wrong Method</a><br />
<a href="<%=GetProductUrl("")%>">Wrong Method</a><br />
<a href='<%=GetProductUrl('SBB035')%>'>Wrong Method</a>
Please Help me to resolve this
Thanks in Advance.
Regards
Sivaram
Re: Added special characters - switching from Source to Desi
Thanks for your help com615
Re: Added special characters - switching from Source to Desi
enter the below code in the ckeditor->config.js
config.protectedSource.push(/<%[\s\S]*?%>([\s\S])*?>/g);
config.protectedSource.push(/<a([^%>]+)>/g);
config.protectedSource.push(/<\/a>/g);
Now CK Editor wont add any extra code in side ur text as specified above
Thanks to Senthil.Kumar and Comp615.
Regards
Sivaram
Re: Added special characters - switching from Source to Desi