diff options
Diffstat (limited to 'lib/asciidoctor/pdf/sanitizer.rb')
| -rw-r--r-- | lib/asciidoctor/pdf/sanitizer.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/asciidoctor/pdf/sanitizer.rb b/lib/asciidoctor/pdf/sanitizer.rb index 8c009ca9..e5574414 100644 --- a/lib/asciidoctor/pdf/sanitizer.rb +++ b/lib/asciidoctor/pdf/sanitizer.rb @@ -19,11 +19,11 @@ module Asciidoctor 'nbsp' => ' ', 'quot' => '"', }).default = '?' - SanitizeXMLRx = /<[^>]+>/ + SanitizeXMLRx = /<[^>]+>\0?/ CharRefRx = /&(?:amp;)?(?:([a-z][a-z]+\d{0,2})|#(?:(\d\d\d{0,4})|x(\h\h\h{0,3})));/ UnescapedAmpersandRx = /&(?!(?:[a-z][a-z]+\d{0,2}|#(?:\d\d\d{0,4}|x\h\h\h{0,3}));)/ - # Strip leading, trailing and repeating whitespace, remove XML tags and + # Strip leading, trailing and repeating whitespace, remove XML tags along with an enclosed null character, and # resolve all entities in the specified string. # # FIXME: move to a module so we can mix it in elsewhere |
