@etsoo/shared 1.2.67 → 1.2.68
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/__tests__/Utils.ts +5 -0
- package/lib/cjs/Utils.js +1 -1
- package/lib/mjs/Utils.js +1 -1
- package/package.json +1 -1
- package/src/Utils.ts +1 -1
package/__tests__/Utils.ts
CHANGED
|
@@ -204,6 +204,11 @@ test("Tests for hasHtmlEntity", () => {
|
|
|
204
204
|
expect(Utils.hasHtmlEntity("< >")).toBeTruthy();
|
|
205
205
|
expect(Utils.hasHtmlEntity("&180;")).toBeFalsy();
|
|
206
206
|
expect(Utils.hasHtmlEntity("&160;")).toBeTruthy();
|
|
207
|
+
expect(
|
|
208
|
+
Utils.hasHtmlEntity(
|
|
209
|
+
"<p>Hello, world! This is <b>BOLD</b>.</p>"
|
|
210
|
+
)
|
|
211
|
+
).toBeTruthy();
|
|
207
212
|
});
|
|
208
213
|
|
|
209
214
|
test("Tests for hasHtmlTag", () => {
|
package/lib/cjs/Utils.js
CHANGED
package/lib/mjs/Utils.js
CHANGED
|
@@ -357,7 +357,7 @@ export var Utils;
|
|
|
357
357
|
* @returns Result
|
|
358
358
|
*/
|
|
359
359
|
function hasHtmlEntity(input) {
|
|
360
|
-
return /&(lt|gt|nbsp|60|62|160)
|
|
360
|
+
return /&(lt|gt|nbsp|60|62|160|#x3C|#x3E|#xA0);/i.test(input);
|
|
361
361
|
}
|
|
362
362
|
Utils.hasHtmlEntity = hasHtmlEntity;
|
|
363
363
|
/**
|
package/package.json
CHANGED
package/src/Utils.ts
CHANGED