lundi 16 février 2015

Chrome changing my inserted html?


Data that I trying to insert into <pre>:



Strange url: <a href="#" onClick="openURL('http://ift.tt/1L5SDh1;')">http://ift.tt/1DzbBKr;
Strangest url with authorization: <a href="#" onClick="openURL('http://-.~_!$&&apos;&quot;()*+,;=:%40:80%2f::::::@example.com')">http://-.~_!$&'"()*+,;=:%40:80%2f::::::@example.com</a>


But after inserting its looks like:



Strange url: <a href="#" onclick="openURL('http://ift.tt/1DzbDCd;')">http://ift.tt/1DzbBKr;
Strangest url with authorization: <a href="#" onclick="openURL('http://-.~_!$&amp;'&quot;()*+,;=:%40:80%2f::::::@example.com')">http://-.~_!$&amp;'"()*+,;=:%40:80%2f::::::@example.com</a>


&lt;b&gt;&lt;/b&gt; inside onclick event got changed, and &&apos;&quot; too.


I'm using AngularJS as $scope.description = $sce.trustAsHtml(filteredDescription); in <pre ng-bind-html="description"></pre>


I have tryed to change code in Chrome to needed one but its not work. Looks like Chrome doing this with my code.





Aucun commentaire:

Enregistrer un commentaire