MCPcopy Create free account
hub / github.com/breck7/scroll / _stripHtml

Function _stripHtml

external/.datatables.js:1203–1225  ·  view source on GitHub ↗
(input)

Source from the content-addressed store, hash-verified

1201
1202 // Replaceable function in api.util
1203 var _stripHtml = function (input) {
1204 if (!input || typeof input !== "string") {
1205 return input
1206 }
1207
1208 // Irrelevant check to workaround CodeQL's false positive on the regex
1209 if (input.length > _max_str_len) {
1210 throw new Error("Exceeded max str len")
1211 }
1212
1213 var previous
1214
1215 input = input.replace(_re_html, "") // Complete tags
1216
1217 // Safety for incomplete script tag - use do / while to ensure that
1218 // we get all instances
1219 do {
1220 previous = input
1221 input = input.replace(/<script/i, "")
1222 } while (input !== previous)
1223
1224 return previous
1225 }
1226
1227 // Replaceable function in api.util
1228 var _escapeHtml = function (d) {

Callers 5

_htmlNumericFunction · 0.85
.datatables.jsFile · 0.85
_fnDetectHeaderFunction · 0.85
_fnGetMaxLenStringFunction · 0.85
_filterStringFunction · 0.85

Calls 1

replaceMethod · 0.80

Tested by

no test coverage detected