FEATURE: whitelist lang attribute

This commit is contained in:
Sam
2018-08-02 16:53:08 +10:00
parent b76d17881b
commit 0b3d51a8bc
2 changed files with 8 additions and 0 deletions

View File

@@ -1307,4 +1307,9 @@ HTML
expect(cooked).to include("data-theme-a")
end
it "whitelists lang attribute" do
cooked = PrettyText.cook("<p lang='fr'>tester</p><div lang='fr'>tester</div><span lang='fr'>tester</span>")
expect(cooked).to eq("<p lang=\"fr\">tester</p><div lang=\"fr\">tester</div><span lang=\"fr\">tester</span>")
end
end