CTAN Markdown: Inline HTML
In general inline HTML is sanitized and the result is passed to the output.
abc <b>def</b> ghi
abc def ghi
This sanitizing means that only white-listed HTML tags and white-listed tag parameters are passed through. Black-listed HTML tags are deleted. Unknown tags are escaped, i.e. the opening < and closing > are translated to HTML entities.
abc <bx>def</bx> ghi
abc <bx>def</bx> ghi
Not white-listed tag parameters are suppressed.
Black-listed tags are suppressed either with or without their body.
The following list contains the white-listed tags and attributes:
| Tag | Attributes |
|---|---|
| a | class, id, style, name, href, title |
| abbr | class, id, style |
| acronym | class, id, style |
| address | class, id, style |
| area | class, id, style |
| b | class, id, style |
| bdo | class, id, style |
| big | class, id, style |
| blockquote | class, id, style |
| br | class, id, style |
| caption | class, id, style |
| center | class, id, style |
| cite | class, id, style |
| code | class, id, style |
| col | class, id, style |
| colgroup | class, id, style |
| dd | class, id, style |
| del | class, id, style |
| dfn | class, id, style |
| dir | class, id, style |
| div | class, id, style, align |
| dl | class, id, style |
| dt | class, id, style |
| em | class, id, style |
| font | class, id, style, color, face, size |
| h1 | class, id, style |
| h2 | class, id, style |
| h3 | class, id, style |
| h4 | class, id, style |
| h5 | class, id, style |
| h6 | class, id, style |
| hr | class, id, style |
| i | class, id, style |
| img | class, id, style, src, width, height, alt, title |
| ins | class, id, style |
| isindex | class, id, style |
| kbd | class, id, style |
| legend | class, id, style |
| li | class, id, style |
| map | class, id, style |
| noframes | class, id, style |
| noscript | class, id, style |
| ol | class, id, style |
| optgroup | class, id, style |
| p | class, id, style, align |
| pre | class, id, style |
| q | class, id, style |
| s | class, id, style |
| samp | class, id, style |
| small | class, id, style |
| span | class, id, style |
| strike | class, id, style |
| strong | class, id, style |
| sub | class, id, style |
| sup | class, id, style |
| table | class, id, style |
| tbody | class, id, style |
| td | class, id, style, align |
| tfoot | class, id, style |
| th | class, id, style, align |
| thead | class, id, style |
| tr | class, id, style |
| tt | class, id, style |
| u | class, id, style |
| ul | class, id, style |
| var | class, id, style |
- Note:
- In contrast to GFM the table tags are not forbidden.
The following list contains the black-listed tags and the unit which is suppressed:
| Tag | Supresses |
|---|---|
| !DOCTYPE | skip tag |
| applet | ignore body |
| base | skip tag |
| basefont | skip tag |
| body | skip tag |
| button | skip tag |
| fieldset | skip tag |
| form | skip tag |
| frame | ignore body |
| frameset | ignore body |
| head | ignore body |
| html | skip tag |
| iframe | ignore body |
| input | skip tag |
| label | skip tag |
| link | skip tag |
| menu | skip tag |
| meta | skip tag |
| object | ignore body |
| option | skip tag |
| param | skip tag |
| script | ignore body |
| select | skip tag |
| style | ignore body |
| textarea | skip tag |
| title | ignore body |
As you can see the “dangerous” JavaScript tags and attributes are filtered out.
CTAN Markdown
- Paragraphs
- Style
- Sections
- Unordered Lists
- Ordered Lists
- Quotations
- Code Blocks
- Tables
- Links
- Images
- Horizontal Rules
- Inline HTML
- Logos
CTAN Markdown Tester
The result of the markdown can interactively be tested with our
Markdown Tester