forked from e621ng/e621ng
fixes #1099
This commit is contained in:
parent
5c55e90810
commit
9e45158423
@ -244,7 +244,7 @@ class DText
|
||||
end
|
||||
|
||||
def self.sanitize(text)
|
||||
text.gsub!(/<( |-|\Z)/, "<\\1")
|
||||
text.gsub!(/<( |-|3|:|>|\Z)/, "<\\1")
|
||||
|
||||
Sanitize.clean(
|
||||
text,
|
||||
|
@ -6427,4 +6427,6 @@ INSERT INTO schema_migrations (version) VALUES ('20130618230158');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20130620215658');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20130712162600');
|
||||
INSERT INTO schema_migrations (version) VALUES ('20130712162600');
|
||||
|
||||
INSERT INTO schema_migrations (version) VALUES ('20130914175431');
|
@ -5,6 +5,10 @@ class DTextTest < ActiveSupport::TestCase
|
||||
DText.parse(s)
|
||||
end
|
||||
|
||||
def test_sanitize_heart
|
||||
assert_equal('<p><3</p>', p("<3"))
|
||||
end
|
||||
|
||||
def test_sanitize_less_than
|
||||
assert_equal('<p><</p>', p("<"))
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user