air18n 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/air18n/version.rb +1 -1
- data/spec/lib/air18n/xss_detector_spec.rb +2 -0
- metadata +1 -1
data/lib/air18n/version.rb
CHANGED
@@ -28,6 +28,7 @@ describe Air18n::XssDetector do
|
|
28
28
|
end
|
29
29
|
|
30
30
|
it "should allow quote mismatches in tags" do
|
31
|
+
Air18n::XssDetector::safe?("<a href='/help/question/280' target='_blank'>Why is this required?</a>", "<a href='/help/question/280' target='_blank'>...</a>").should == { :safe => true }
|
31
32
|
Air18n::XssDetector::safe?("<tag href='hi'>", "<tag href=\"hi\">").should == { :safe => true }
|
32
33
|
end
|
33
34
|
end
|
@@ -39,6 +40,7 @@ describe Air18n::XssDetector do
|
|
39
40
|
|
40
41
|
it "should work" do
|
41
42
|
test("oh boy!<script sup>hello!</script> oh boy!", ["<script sup>", "</script>"])
|
43
|
+
test("<a href='/help/question/280uuuhhhhhhhh' uhhh target='_blank'>Why is this required?</a>", ["<a href='/help/question/280uuuhhhhhhhh' uhhh target='_blank'>", "</a>"])
|
42
44
|
test("oh boy!<<script sup>hello!</script> oh boy!", ["<<script sup>hello!</script> oh boy!"])
|
43
45
|
test('Success! You\'ve invited %{number} friends. <a href="/referrals">Invite <b>more</b>.</a>', ['<a href="/referrals">', '<b>', '</b>', '</a>'])
|
44
46
|
end
|