telerikradeditor

How to stop Terlerik RadEditor from de-obfuscates email addresses


I am running into an issue where if you put an obfuscated email address in the RadEditor it de-obfuscates it.

You put the following in:

<a href='&#109;&#97;ilto&#58;John&#46;Doe%4&#48;%65x&#37;61%&#54;Dple&#46;com'>&#74;&#111;&#104;n&#46;D&#111;&#101;&#64;exa&#109;ple&#46;&#99;o&#109;</a>

It converts it to:

<a href="mailto:John.Doe%40%65x%61%6Dple.com">John.Doe@example.com</a>

How do you stop the control from doing this?

Thanks in advance.


Solution

  • I think it is the browser that does that (read the HTML entities and transform them): https://jsfiddle.net/x1wxpaps/ so I doubt you can stop it.

    <div style="border: 2px solid red; width: 300px; height: 300px;" contentEditable="true" id="test">
    <a href='&#109;&#97;ilto&#58;John&#46;Doe%4&#48;%65x&#37;61%&#54;Dple&#46;com'>&#74;&#111;&#104;n&#46;D&#111;&#101;&#64;exa&#109;ple&#46;&#99;o&#109;</a>
    </div>
    <script>
    alert(document.getElementById("test").innerHTML)
    </script>