|
|
@ -31,7 +31,7 @@ class Pango |
|
|
|
{ |
|
|
|
{ |
|
|
|
$lines[$index] = sprintf( |
|
|
|
$lines[$index] = sprintf( |
|
|
|
'<span size="xx-large">%s</span>', |
|
|
|
'<span size="xx-large">%s</span>', |
|
|
|
htmlentities( |
|
|
|
self::escape( |
|
|
|
$h1 |
|
|
|
$h1 |
|
|
|
) |
|
|
|
) |
|
|
|
); |
|
|
|
); |
|
|
@ -44,7 +44,7 @@ class Pango |
|
|
|
{ |
|
|
|
{ |
|
|
|
$lines[$index] = sprintf( |
|
|
|
$lines[$index] = sprintf( |
|
|
|
'<span size="x-large">%s</span>', |
|
|
|
'<span size="x-large">%s</span>', |
|
|
|
htmlentities( |
|
|
|
self::escape( |
|
|
|
$h2 |
|
|
|
$h2 |
|
|
|
) |
|
|
|
) |
|
|
|
); |
|
|
|
); |
|
|
@ -57,7 +57,7 @@ class Pango |
|
|
|
{ |
|
|
|
{ |
|
|
|
$lines[$index] = sprintf( |
|
|
|
$lines[$index] = sprintf( |
|
|
|
'<span size="large">%s</span>', |
|
|
|
'<span size="large">%s</span>', |
|
|
|
htmlentities( |
|
|
|
self::escape( |
|
|
|
$h3 |
|
|
|
$h3 |
|
|
|
) |
|
|
|
) |
|
|
|
); |
|
|
|
); |
|
|
@ -70,7 +70,7 @@ class Pango |
|
|
|
{ |
|
|
|
{ |
|
|
|
if (!in_array($index, $escaped)) |
|
|
|
if (!in_array($index, $escaped)) |
|
|
|
{ |
|
|
|
{ |
|
|
|
$lines[$index] = htmlentities( |
|
|
|
$lines[$index] = self::escape( |
|
|
|
$line |
|
|
|
$line |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
@ -83,4 +83,13 @@ class Pango |
|
|
|
$lines |
|
|
|
$lines |
|
|
|
); |
|
|
|
); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static function escape( |
|
|
|
|
|
|
|
string $value |
|
|
|
|
|
|
|
): string |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
return htmlspecialchars( |
|
|
|
|
|
|
|
$value |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |