* If href is nil, allow node
* Add unit test showing no change
My first pass had the `<a>` within an h1 content, but the scrubber
added a newline after the closing a tag?
* Extracting container for allowed tags & attrs
Prior to this commit, we had several different locations in which we
specified ALLOWED_TAGS and ALLOWED_ATTRIBUTES for HTML rendering and
sanitization.
Curious to see how these either intersected or didn't, I opted to
create a container module that allows for us to more readily normalize
these allowed tags and attributes. It's possible that we won't do any
normalization, but this work helps make that easier.
Ideally, I'd love us to contextualize "why did we choose the
tags/attributes we chose?" But for now, I think consolidating these
tags and attributes will help make adding a `details` and `summary` tag
easier.
This relates to forem/rfcs#296
See [Google Sheet][1] for analysis of what tags/attributes are used, the
intersection and union.
[1]:https://docs.google.com/spreadsheets/d/1yj-a1qus1o0o4cj-_gOMP5yteeg-_f3s5z7kvK0Y7RM/edit#gid=0
* Fixing misnamed constant
* Fixing misnamed constant
* Extracting additional HtmlRendering use cases
* Adding comparative documentation for HTML tags
* Fixing broken parameter signature
* Moving constants into MarkdownProcessor
* Remove definitely unused attributes
* Refactor and remove unused attributes
* Add parentheses
* Prevent alt tag from having Liquid tags inside
* Add test
* Remove more unused attributes
* Scrub any valid attributes
* Remove unused tags and add more tests
* Remove <i> tag; <em> is used by parser
* Remove <center> b/c it's deprecated though still valid
* <cite> is a safe tag and used by some
* Eh I changed my mind about center lol
* Add underline <u> back in
* Don't allow width changes
* Use frozen constant for regex
* Use #remove over #gsub
* Added <kbd> tag support to markdown editors in article posts and comments.
* Fixed typo in test.
* Fixed test - now compares against inner html.
* Removed .showpage-signi-cta as dead code was reinstated accidentally via git merge.
* Use sass placeholder as no need to output the .kbd class in the css.
* Reinstated original css as accidentally changed with merge.
* Lint and clean up github issue styles
* Use heredoc HTML for easier formatting
* Add better error handling for 404 github issues
* Use custom sanitizer for markdown render
* Refactor unless to ternary
* Rename file and tighten up sanitization
* Fix codepen and instagram tag styling