Here is sample code:
<div id="file" filename="/blahblah-١.php">AA</div>
<script>
var d = document.getElementById('file').getAttribute('filename');
console.log(d);
</script>
I want to get:
/blahblah-١.php
in logs, but above entity is translated to unicode.
How to get raw value of attribute in js or jquery?
When html file is generated via php, need to escape strings, especially this:
htmlspecialchars('/blahblah-١.php');
In my case it was generated by php.