0
我想編碼一個已編碼的字符串。編碼引號'&';'沒有被編碼爲'& amp;';''當使用HtmlHelper.encode()方法()。HtmlHelper.Encode()編碼的報價
有沒有辦法可以對所有字符進行雙重編碼?
例如:
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js">
成爲
&lt;script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js"&gt;
時,我想
&lt;script type=&quot;text/javascript&quot; src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4.3/jquery.min.js&quot;&gt;
econding後,我取代的 '"' 字符串出現與 '& QUOT;' – ajp 2014-09-29 22:51:20
沒有必要......看看我的答案。它訣竅! :) – 2014-09-29 22:52:19
@KeyvanSadralodabai behvior是否打算?雙重編碼會導致& lt;到& amp; lt; – ajp 2014-09-29 23:06:13