(text)
| 1229 | |
| 1230 | |
| 1231 | var _EncodeAmpsAndAngles = function(text) { |
| 1232 | // Smart processing for ampersands and angle brackets that need to be encoded. |
| 1233 | |
| 1234 | // Ampersand-encoding based entirely on Nat Irons's Amputator MT plugin: |
| 1235 | // http://bumppo.net/projects/amputator/ |
| 1236 | text = text.replace(/&(?!#?[xX]?(?:[0-9a-fA-F]+|\w+);)/g,"&"); |
| 1237 | |
| 1238 | // Encode naked <'s |
| 1239 | text = text.replace(/<(?![a-z\/?\$!])/gi,"<"); |
| 1240 | |
| 1241 | return text; |
| 1242 | } |
| 1243 | |
| 1244 | |
| 1245 | var _EncodeBackslashEscapes = function(text) { |
no outgoing calls
no test coverage detected