From 89be98534a394495e2913dbcbb4d71bdc7d4c806 Mon Sep 17 00:00:00 2001 From: Stephen Sylvia Date: Mon, 11 Jun 2018 15:54:01 -0400 Subject: [PATCH] #11 Allow style attribute on "p" tags. (#12) --- README.md | 28 ++++++++++++++-------------- package.json | 2 +- src/index.ts | 2 +- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 63f653b..a05c2ec 100644 --- a/README.md +++ b/README.md @@ -29,14 +29,14 @@ article: https://www.owasp.org/index.php/XSS_(Cross_Site_Scripting)_Prevention_C ## Table of Contents -* [Why `js-xss`?](#why-js-xss) -* [Installation](#installation) -* [Usage](#usage) -* [Issues](#issues) -* [Versioning](#versioning) -* [Contributing](#contributing) -* [License](#license) -* [Dependencies](#dependencies) +- [Why `js-xss`?](#why-js-xss) +- [Installation](#installation) +- [Usage](#usage) +- [Issues](#issues) +- [Versioning](#versioning) +- [Contributing](#contributing) +- [License](#license) +- [Dependencies](#dependencies) ### Why [`js-xss`](https://github.com/leizongmin/js-xss)? @@ -89,7 +89,7 @@ Load as script tag - + ``` #### Basic Usage @@ -199,9 +199,9 @@ yarn run test --watch Build compiled output: -* ES Module outputs to `dist/esm/index.js`. -* Node Module outputs to `dist/node/index.js`. -* UMD Module outputs to `dist/umd/arcgis-html-sanitizer.js` and `dist/umd/arcgis-html-sanitizer.min.js`. +- ES Module outputs to `dist/esm/index.js`. +- Node Module outputs to `dist/node/index.js`. +- UMD Module outputs to `dist/umd/arcgis-html-sanitizer.js` and `dist/umd/arcgis-html-sanitizer.min.js`. ```sh yarn build @@ -233,5 +233,5 @@ A copy of the license is available in the repository's [LICENSE](./LICENSE) file ### Dependencies -* [js-xss](https://github.com/leizongmin/js-xss) ([MIT](https://github.com/leizongmin/js-xss#license)) -* [Lodash isPlainObject](https://www.npmjs.com/package/lodash.isplainobject) ([MIT](https://raw.githubusercontent.com/lodash/lodash/4.17.10-npm/LICENSE)) +- [js-xss](https://github.com/leizongmin/js-xss) ([MIT](https://github.com/leizongmin/js-xss#license)) +- [Lodash isPlainObject](https://www.npmjs.com/package/lodash.isplainobject) ([MIT](https://raw.githubusercontent.com/lodash/lodash/4.17.10-npm/LICENSE)) diff --git a/package.json b/package.json index b9d594e..ebdace7 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@esri/arcgis-html-sanitizer", - "version": "0.4.0", + "version": "0.5.0", "description": "A simple utility to sanitize a string according to ArcGIS supported HTML specification.", "main": "dist/node/index.js", diff --git a/src/index.ts b/src/index.ts index d6ee52e..995e92f 100644 --- a/src/index.ts +++ b/src/index.ts @@ -73,12 +73,12 @@ export class Sanitizer { 'nowrap', 'style' ], + p: ['style'], b: [], strong: [], i: [], em: [], br: [], - p: [], li: [], ul: [], tbody: []