Re: [3.3] Fehlermeldung
Verfasst: 22.02.2020 11:37
Danke, es brennt nicht!
Error: Using htmlspecialchars on line 221 in /tierra/topicsolved/event/main_listener.php
Error: Using htmlspecialchars on line 226 in /tierra/topicsolved/event/main_listener.php
Error: Using htmlspecialchars on line 283 in /tierra/topicsolved/topicsolved.php
Error: Using htmlspecialchars on line 289 in /tierra/topicsolved/topicsolved.php
Error: Using htmlspecialchars on line 334 in /tierra/topicsolved/topicsolved.php
Error: Using htmlspecialchars on line 340 in /tierra/topicsolved/topicsolved.php
Code: Alles auswählen
if (!empty($row['forum_solve_text']))
{
if (!empty($row['forum_solve_color']))
{
<- Zeile 221-> $title = sprintf($markup, htmlspecialchars($solved_url, ENT_QUOTES, 'UTF-8'), <- Zeile 221->
"color: #{$row['forum_solve_color']};", $row['forum_solve_text']);
}
else
{
<- Zeile 226-> $title = sprintf($markup, htmlspecialchars($solved_url, ENT_QUOTES, 'UTF-8'), <- Zeile 226 ->
'', $row['forum_solve_text']);
}
}
Code: Alles auswählen
public function image($type, $alt = '', $url = '')
{
$title = '';
$markup = $this->user->img('icon_solved_' . $type, $alt);
if (!empty($alt))
{
$alt = $this->user->lang($alt);
<-Zeile 283-> $title = ' title="' . htmlspecialchars($alt, ENT_QUOTES, 'UTF-8') . '"';<-Zeile 283->
}
if (!empty($url))
{
$markup = sprintf('<a href="%s"%s>%s</a>',
<- Zeile 289-> htmlspecialchars($url, ENT_QUOTES, 'UTF-8'), $title, $markup);<- Zeile 289->
}
return $markup;
}
Code: Alles auswählen
$markup = sprintf(
'<i class="%1s" style="color: #%2s" aria-hidden="true"></i>',
$classes, $color
);
if (!empty($alt))
{
$alt = $this->user->lang($alt);
<-Zeile 334-> $title = ' title="' . htmlspecialchars($alt, ENT_QUOTES, 'UTF-8') . '"'; <-Zeile 334->
}
if (!empty($url))
{
$markup = sprintf('<a href="%s"%s>%s</a>',
<-Zeile 340-> htmlspecialchars($url, ENT_QUOTES, 'UTF-8'), $title, $markup);<-Zeile 340->
}
return $markup;
htmlspecialchars
schlicht zu unsicher, weil es nicht alle zeichen umwandelthtmlentities
wandelt alle zeichen sicher umENT_QUOTES
als auch UTF8
ist in beiden als parameter vorhanden htmlspecialchars($solved_url, ENT_QUOTES, 'UTF-8'),
htmlentities($solved_url, ENT_QUOTES, 'UTF-8'),