当我把Achor标签动态URL转换得很糟糕时

时间:2017-07-10 12:14:44

标签: c# asp.net ckeditor

我将html放在ckeditor中

 <li><a href="<%#ConfigurationManager.AppSettings["Path"].ToString()%>Default">Home</a></li>

但它会将其转换为类似的内容,

<li><a a="" href="&lt;%#ConfigurationManager.AppSettings["><i class="fa fa-angle-right"></i></a></li>

我做什么?

1 个答案:

答案 0 :(得分:0)

找到 config.js 并在ckEditor配置部分中添加/替换以下内容:

//Whether to escape HTML when the editor updates the original input element.   
config.htmlEncodeOutput = false; 

//Whether to use HTML entities in the editor output.
config.entities = false; 

//Whether to escape basic HTML entities in the document
config.basicEntities = false; 

来源:Check Docs