Skip to content

Commit e345d7d

Browse files
Sim4n6aibaars
andauthored
Update ruby/ql/src/experimental/cwe-176/examples/unicode_normalization.rb
Co-authored-by: Arthur Baars <[email protected]>
1 parent 7cd1fd4 commit e345d7d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ruby/ql/src/experimental/cwe-176/examples/unicode_normalization.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
class UnicodeNormalizationHtMLSafeController < ActionController::Base
22
def unicodeNormalize
33
unicode_input = params[:unicode_input]
4-
unicode_html_safe = unicode_input.html_safe
4+
unicode_html_safe = CGI.escapeHTML(unicode_input).html_safe
55
normalized_nfkc = unicode_html_safe.unicode_normalize(:nfkc) # $result=BAD
66
normalized_nfc = unicode_html_safe.unicode_normalize(:nfc) # $result=BAD
77
end

0 commit comments

Comments
 (0)