mirror of
https://github.com/discourse/discourse.git
synced 2025-06-06 03:06:53 +08:00
DEV: improve comment (#18041)
improves comment about caught exception to match implementation
This commit is contained in:
@ -23,7 +23,9 @@ module RetrieveTitle
|
|||||||
begin
|
begin
|
||||||
doc = Nokogiri::HTML5(html, nil, encoding)
|
doc = Nokogiri::HTML5(html, nil, encoding)
|
||||||
rescue ArgumentError
|
rescue ArgumentError
|
||||||
# invalid HTML (too many attributes) - ignore
|
# invalid HTML (Eg: too many attributes, status tree too deep) - ignore
|
||||||
|
# Error in nokogumbo is not specialized, uses generic ArgumentError
|
||||||
|
# see: https://www.rubydoc.info/gems/nokogiri/Nokogiri/HTML5#label-Error+reporting
|
||||||
end
|
end
|
||||||
|
|
||||||
if doc
|
if doc
|
||||||
|
Reference in New Issue
Block a user