Fix regression in HtmlSanitizer::cleanup_target (whitespace deletion)
This commit is contained in:
parent
5583369d8b
commit
23f30921dc
1 changed files with 1 additions and 1 deletions
|
@ -375,7 +375,7 @@ cleanup html string:
|
|||
|
||||
def self.cleanup_target(string, **options)
|
||||
cleaned_string = CGI.unescape(string).utf8_encode(fallback: :read_as_sanitized_binary)
|
||||
cleaned_string = cleaned_string.delete(' ') unless options[:keep_spaces]
|
||||
cleaned_string = cleaned_string.gsub(/[[:space:]]/, '') if !options[:keep_spaces]
|
||||
cleaned_string = cleaned_string.strip
|
||||
.delete("\t\n\r\u0000")
|
||||
.gsub(%r{/\*.*?\*/}, '')
|
||||
|
|
Loading…
Reference in a new issue