CTAN Comprehensive TeX Archive Network

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:

TagAttributes
aclass, id, style, name, href, title
abbrclass, id, style
acronymclass, id, style
addressclass, id, style
areaclass, id, style
bclass, id, style
bdoclass, id, style
bigclass, id, style
blockquoteclass, id, style
brclass, id, style
captionclass, id, style
centerclass, id, style
citeclass, id, style
codeclass, id, style
colclass, id, style
colgroupclass, id, style
ddclass, id, style
delclass, id, style
dfnclass, id, style
dirclass, id, style
divclass, id, style, align
dlclass, id, style
dtclass, id, style
emclass, id, style
fontclass, id, style, color, face, size
h1class, id, style
h2class, id, style
h3class, id, style
h4class, id, style
h5class, id, style
h6class, id, style
hrclass, id, style
iclass, id, style
imgclass, id, style, src, width, height, alt, title
insclass, id, style
isindexclass, id, style
kbdclass, id, style
legendclass, id, style
liclass, id, style
mapclass, id, style
noframesclass, id, style
noscriptclass, id, style
olclass, id, style
optgroupclass, id, style
pclass, id, style, align
preclass, id, style
qclass, id, style
sclass, id, style
sampclass, id, style
smallclass, id, style
spanclass, id, style
strikeclass, id, style
strongclass, id, style
subclass, id, style
supclass, id, style
tableclass, id, style
tbodyclass, id, style
tdclass, id, style, align
tfootclass, id, style
thclass, id, style, align
theadclass, id, style
trclass, id, style
ttclass, id, style
uclass, id, style
ulclass, id, style
varclass, 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:

TagSupresses
!DOCTYPEskip tag
appletignore body
baseskip tag
basefontskip tag
bodyskip tag
buttonskip tag
fieldsetskip tag
formskip tag
frameignore body
framesetignore body
headignore body
htmlskip tag
iframeignore body
inputskip tag
labelskip tag
linkskip tag
menuskip tag
metaskip tag
objectignore body
optionskip tag
paramskip tag
scriptignore body
selectskip tag
styleignore body
textareaskip tag
titleignore body

As you can see the “dangerous” JavaScript tags and attributes are filtered out.

CTAN Markdown

CTAN Markdown Tester

The result of the markdown can interactively be tested with our

Markdown Tester
Guest Book Sitemap Contact Contact Author