Skip to content

Commit

Permalink
Allow id attribute on <a> tags
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeRalphson committed Dec 19, 2017
1 parent 6b3122f commit a3d119b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ function clean(s) {
let sanitizeOptions = {
allowedTags: sanitizeHtml.defaults.allowedTags.concat([ 'h1', 'h2', 'img', 'aside', 'article', 'details',
'summary', 'abbr', 'meta', 'link' ]),
allowedAttributes: { a: [ 'href', 'name', 'target', 'class' ], img: [ 'src', 'alt', 'class' ] , aside: [ 'class' ],
allowedAttributes: { a: [ 'href', 'id', 'name', 'target', 'class' ], img: [ 'src', 'alt', 'class' ] , aside: [ 'class' ],
abbr: [ 'title', 'class' ], details: [ 'open', 'class' ], div: [ 'class' ], meta: [ 'name', 'content' ],
link: [ 'rel', 'href', 'type', 'sizes' ],
h1: [ 'id' ], h2: [ 'id' ], h3: [ 'id' ], h4: [ 'id' ], h5: [ 'id' ], h6: [ 'id' ]}
Expand Down

0 comments on commit a3d119b

Please sign in to comment.