(input)
| 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) { |
no test coverage detected