Fix exception when trying to serialize posts with <a> tags in them without hrefs (#1334)
* fix exception when trying to serialize posts with <a> tags in them without hrefs * Add tests Co-authored-by: Thibaut Girka <thib@sitedethib.com>
This commit is contained in:
@ -55,7 +55,7 @@ class Sanitize
|
||||
end
|
||||
|
||||
LINK_REL_TRANSFORMER = lambda do |env|
|
||||
return unless env[:node_name] == 'a'
|
||||
return unless env[:node_name] == 'a' and env[:node]['href']
|
||||
|
||||
node = env[:node]
|
||||
|
||||
|
Reference in New Issue
Block a user