Skip to content
Snippets Groups Projects
Commit 16d82184 authored by David Siegfried's avatar David Siegfried Committed by Jan-Hendrik Willms
Browse files

prevent php-warnings in htmlpurifier, fixes #4883

Closes #4883

Merge request !3658
parent 45ee1ea6
No related branches found
No related tags found
No related merge requests found
......@@ -10,7 +10,11 @@ class HTMLPurifier_Injector_TransformLinks extends HTMLPurifier_Injector
public function handleElement(&$token)
{
if ($token->name === 'a' && isset($token->attr['class']) && $token->attr['class'] === 'link-intern') {
if (
$token->name === 'a'
&& isset($token->attr['href'], $token->attr['class'])
&& $token->attr['class'] === 'link-intern'
) {
$token->attr['href'] = TransformInternalLinks($token->attr['href']);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment