Nasty!
How did a well-formedness bug creep into the code? I *swear* this used to work.
This commit is contained in:
parent
1bef71bbf1
commit
3843fa608d
2 changed files with 8 additions and 16 deletions
|
@ -23,9 +23,9 @@ class SanitizerTest < Test::Unit::TestCase
|
|||
end
|
||||
|
||||
def test_sanitize_named_entities
|
||||
input = '<p>Greek &phis; φ, double-struck 𝔸, numeric 𝔸 ⁗, uppercase ™ <</p>'
|
||||
output = "<p>Greek \317\225 \317\206, double-struck \360\235\224\270, numeric \360\235\224\270 \342\201\227, uppercase \342\204\242 <</p>"
|
||||
output2 = "<p>Greek \317\225 \317\206, double-struck \360\235\224\270, numeric 𝔸 ⁗, uppercase \342\204\242 <</p>"
|
||||
input = '<p>Greek &phis; φ, double-struck 𝔸, numeric   𝔸 ⁗, uppercase ™ <</p>'
|
||||
output = "<p>Greek \317\225 \317\206, double-struck \360\235\224\270, numeric \302\240 \302\240 \360\235\224\270 \342\201\227, uppercase \342\204\242 <</p>"
|
||||
output2 = "<p>Greek \317\225 \317\206, double-struck \360\235\224\270, numeric \302\240   𝔸 ⁗, uppercase \342\204\242 <</p>"
|
||||
check_sanitization(input, output, output, output)
|
||||
assert_equal(output2, input.to_utf8.as_bytes)
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue