Merge branch 'bzr/golem' of /Users/distler/Sites/code/instiki
This commit is contained in:
commit
e652af4e73
|
@ -16,8 +16,7 @@ class String
|
||||||
|
|
||||||
def check_ncrs
|
def check_ncrs
|
||||||
text = gsub(/&#[xX]([a-fA-F0-9]+);/) { |m| [$1.hex].pack('U*') =~ UTF8_REGEX ? m : '' }
|
text = gsub(/&#[xX]([a-fA-F0-9]+);/) { |m| [$1.hex].pack('U*') =~ UTF8_REGEX ? m : '' }
|
||||||
text.gsub!(/&#(\d+);/) { |m| [$1.to_i].pack('U*') =~ UTF8_REGEX ? m : '' }
|
text.gsub(/&#(\d+);/) { |m| [$1.to_i].pack('U*') =~ UTF8_REGEX ? m : '' }
|
||||||
text
|
|
||||||
end
|
end
|
||||||
|
|
||||||
UTF8_REGEX = /\A(
|
UTF8_REGEX = /\A(
|
||||||
|
|
Loading…
Reference in a new issue