"Trying to get property 'browsable' of non-object" in HTMLPurifier_AttrTransform_* methods, because parse or getSchemeObj of HTMLPurifier_URIParser can return false #343
Hi!
I have an PHP error "Trying to get property 'browsable' of non-object" when I execute code in HTMLPurifier_AttrTransform_TargetBlank and HTMLPurifier_AttrTransform_Nofollow, because, they don't check results of
(new HTMLPurifier_URIParser())->parse (can return false)
(new HTMLPurifier_URIParser())->parse->getSchemeObj (also can return false)
for false value. Methods suggest, that only object can be returned.
Hi! I have an PHP error "Trying to get property 'browsable' of non-object" when I execute code in HTMLPurifier_AttrTransform_TargetBlank and HTMLPurifier_AttrTransform_Nofollow, because, they don't check results of
for false value. Methods suggest, that only object can be returned.
need replace to something like that:
You can test purify on html like this:
My config for new HTMLPurifier: