Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript htmlentities

function htmlEntities(str) {
    return String(str).replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>').replace(/"/g, '"');
}
Source by css-tricks.com #
 
PREVIOUS NEXT
Tagged: #javascript #htmlentities
ADD COMMENT
Topic
Name
2+9 =