2 Copyright (c) 2010, Yahoo! Inc. All rights reserved.
3 Code licensed under the BSD License:
4 http://developer.yahoo.com/yui/license.html
8 YUI.add('escape',function(Y){var HTML_CHARS={'&':'&','<':'<','>':'>','"':'"',"'":''','/':'/','`':'`'},Escape={html:function(string){return string.replace(/[&<>"'\/`]/g,Escape._htmlReplacer);},regex:function(string){return string.replace(/[\-#$\^*()+\[\]{}|\\,.?\s]/g,'\\$&');},_htmlReplacer:function(match){return HTML_CHARS[match];}};Escape.regexp=Escape.regex;Y.Escape=Escape;},'3.3.0');