third-party/angularjs/angular-1.6.5/angular-sanitize.js 1 location
|
@@ 482-495 (lines=14) @@
|
479 |
|
* @param value |
480 |
|
* @returns {string} escaped text |
481 |
|
*/ |
482 |
|
function encodeEntities(value) { |
483 |
|
return value. |
484 |
|
replace(/&/g, '&'). |
485 |
|
replace(SURROGATE_PAIR_REGEXP, function(value) { |
486 |
|
var hi = value.charCodeAt(0); |
487 |
|
var low = value.charCodeAt(1); |
488 |
|
return '&#' + (((hi - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000) + ';'; |
489 |
|
}). |
490 |
|
replace(NON_ALPHANUMERIC_REGEXP, function(value) { |
491 |
|
return '&#' + value.charCodeAt(0) + ';'; |
492 |
|
}). |
493 |
|
replace(/</g, '<'). |
494 |
|
replace(/>/g, '>'); |
495 |
|
} |
496 |
|
|
497 |
|
/** |
498 |
|
* create an HTML/XML writer which writes to buffer |
third-party/angularjs/angular-1.6.4/angular-sanitize.js 1 location
|
@@ 432-445 (lines=14) @@
|
429 |
|
* @param value |
430 |
|
* @returns {string} escaped text |
431 |
|
*/ |
432 |
|
function encodeEntities(value) { |
433 |
|
return value. |
434 |
|
replace(/&/g, '&'). |
435 |
|
replace(SURROGATE_PAIR_REGEXP, function(value) { |
436 |
|
var hi = value.charCodeAt(0); |
437 |
|
var low = value.charCodeAt(1); |
438 |
|
return '&#' + (((hi - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000) + ';'; |
439 |
|
}). |
440 |
|
replace(NON_ALPHANUMERIC_REGEXP, function(value) { |
441 |
|
return '&#' + value.charCodeAt(0) + ';'; |
442 |
|
}). |
443 |
|
replace(/</g, '<'). |
444 |
|
replace(/>/g, '>'); |
445 |
|
} |
446 |
|
|
447 |
|
/** |
448 |
|
* create an HTML/XML writer which writes to buffer |
third-party/angularjs/angular-1.5.0/angular-sanitize.js 1 location
|
@@ 412-425 (lines=14) @@
|
409 |
|
* @param value |
410 |
|
* @returns {string} escaped text |
411 |
|
*/ |
412 |
|
function encodeEntities(value) { |
413 |
|
return value. |
414 |
|
replace(/&/g, '&'). |
415 |
|
replace(SURROGATE_PAIR_REGEXP, function(value) { |
416 |
|
var hi = value.charCodeAt(0); |
417 |
|
var low = value.charCodeAt(1); |
418 |
|
return '&#' + (((hi - 0xD800) * 0x400) + (low - 0xDC00) + 0x10000) + ';'; |
419 |
|
}). |
420 |
|
replace(NON_ALPHANUMERIC_REGEXP, function(value) { |
421 |
|
return '&#' + value.charCodeAt(0) + ';'; |
422 |
|
}). |
423 |
|
replace(/</g, '<'). |
424 |
|
replace(/>/g, '>'); |
425 |
|
} |
426 |
|
|
427 |
|
/** |
428 |
|
* create an HTML/XML writer which writes to buffer |