Skip to content

Commit 32cef47

Browse files
committed
Add <a> to inline content set
Fixes issue #31
1 parent af6ce63 commit 32cef47

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

library/HTMLPurifier/HTML5Config.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
class HTMLPurifier_HTML5Config extends HTMLPurifier_Config
44
{
5-
const REVISION = 2019041501;
5+
const REVISION = 2019042601;
66

77
/**
88
* @param string|array|HTMLPurifier_Config $config

library/HTMLPurifier/HTMLModule/HTML5/Hypertext.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public function setup($config)
2525
'target' => new HTMLPurifier_AttrDef_HTML_FrameTarget(),
2626
'type' => 'Text',
2727
));
28+
$this->addElementToContentSet('a', 'Inline');
2829
$a->excludes = array('a' => true);
2930
}
3031
}

tests/HTMLPurifier/HTMLModule/HTML5/HypertextTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,13 @@ public function anchorInput()
2323
array(
2424
'<a href="foo" download="bar">Download</a>',
2525
),
26+
array(
27+
'<p>Foo <a href="foo">foo</a> bar</p>'
28+
),
29+
array(
30+
'<a href="foo"><p>Foo <a href="foo">foo</a></p></a>',
31+
'<a href="foo"><p>Foo </p></a>',
32+
),
2633
);
2734
}
2835

0 commit comments

Comments
 (0)