File: attribute_sanitize.md

package info (click to toggle)
ruby-maruku 0.7.3-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, buster, forky, sid, trixie
  • size: 1,304 kB
  • sloc: ruby: 5,741; xml: 235; makefile: 2
file content (22 lines) | stat: -rw-r--r-- 679 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
Make sure extended attributes get escaped when generating HTML: https://github.com/bhollis/maruku/issues/114
*** Parameters: ***
{} # params
*** Markdown input: ***
*foo*{: style='ball & chain'}

*foo*{: style='ball\008 chain'}

*foo*{: style='ball\" badAttribute=\"chain'}
*** Output of inspect ***
md_el(:document, [
  md_par(md_em("foo", [["style", "ball & chain"]])),
  md_par(md_em("foo", [["style", "ball\\008 chain"]])),
  md_par(md_em("foo", [["style", "ball\" badAttribute=\"chain"]]))
])
*** Output of to_html ***
<p><em style="ball &amp; chain">foo</em>
</p>
<p><em style="ball\008 chain">foo</em>
</p>
<p><em style="ball&quot; badAttribute=&quot;chain">foo</em>
</p>