Skip to content

Jquery plugin to escape a string to HTML, like PHP's htmlspecialchars (with ENT_QUOTES)

License

Notifications You must be signed in to change notification settings

Thue/jquery.escape.js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Very simple plugin.

Usage:

<script type="text/javascript" src="rfwadmin_files/jquery-1.10.2.min.js"></script>
<script type="text/javascript" src="rfwadmin_files/jquery.escape.js"></script>
<script type="text/javascript">alert($.escape('&<>"\''))</script>

I am not sure if the $.escape = $.prototype.escape = function(...) is the official jquery way of defining a method called without a context. Seems to work.

About

Jquery plugin to escape a string to HTML, like PHP's htmlspecialchars (with ENT_QUOTES)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published