use Dotclear Helper Html

This commit is contained in:
Jean-Christian Denis 2023-04-08 10:25:00 +02:00
parent 39ab49bcac
commit 7528bd357c
Signed by: JcDenis
GPG key ID: 1B5B8C5B90B6C951

View file

@ -16,10 +16,10 @@ namespace Dotclear\Plugin\postInfoWidget;
use dcCore; use dcCore;
use dcRecord; use dcRecord;
use Dotclear\Helper\Html\Html;
use Dotclear\Plugin\widgets\WidgetsStack; use Dotclear\Plugin\widgets\WidgetsStack;
use Dotclear\Plugin\widgets\WidgetsElement; use Dotclear\Plugin\widgets\WidgetsElement;
use dt; use dt;
use html;
use l10n; use l10n;
class Widgets class Widgets
@ -249,7 +249,7 @@ class Widgets
str_replace( str_replace(
['%T', '%C', '%F'], ['%T', '%C', '%F'],
[$lang_name, $lang_code, $lang_flag], [$lang_name, $lang_code, $lang_flag],
html::escapeHTML($w->lang_str) Html::escapeHTML($w->lang_str)
) )
); );
} }
@ -261,7 +261,7 @@ class Widgets
str_replace( str_replace(
'%T', '%T',
dcCore::app()->ctx->posts->getAuthorLink(), dcCore::app()->ctx->posts->getAuthorLink(),
html::escapeHTML($w->author_str) Html::escapeHTML($w->author_str)
) )
); );
} }
@ -275,9 +275,9 @@ class Widgets
sprintf( sprintf(
$link, $link,
dcCore::app()->ctx->posts->getCategoryURL(), dcCore::app()->ctx->posts->getCategoryURL(),
html::escapeHTML(dcCore::app()->ctx->posts->f('cat_title')) Html::escapeHTML(dcCore::app()->ctx->posts->f('cat_title'))
), ),
html::escapeHTML($w->category_str) Html::escapeHTML($w->category_str)
) )
); );
} }
@ -304,7 +304,7 @@ class Widgets
str_replace( str_replace(
'%T', '%T',
implode(', ', $metas), implode(', ', $metas),
html::escapeHTML($w->tag_str) Html::escapeHTML($w->tag_str)
) )
); );
} }
@ -345,7 +345,7 @@ class Widgets
str_replace( str_replace(
['%T', '%D'], ['%T', '%D'],
[$attachment_textual, $attachment_numeric], [$attachment_textual, $attachment_numeric],
html::escapeHTML($w->attachment_str) Html::escapeHTML($w->attachment_str)
) )
); );
} }
@ -385,7 +385,7 @@ class Widgets
str_replace( str_replace(
['%T', '%D'], ['%T', '%D'],
[$comment_textual, $comment_numeric], [$comment_textual, $comment_numeric],
html::escapeHTML($w->comment_str) Html::escapeHTML($w->comment_str)
) )
); );
} }
@ -425,7 +425,7 @@ class Widgets
str_replace( str_replace(
['%T', '%D'], ['%T', '%D'],
[$trackback_textual, $trackback_numeric], [$trackback_textual, $trackback_numeric],
html::escapeHTML($w->trackback_str) Html::escapeHTML($w->trackback_str)
) )
); );
} }
@ -444,7 +444,7 @@ class Widgets
), ),
dcCore::app()->ctx->posts->getURL(), dcCore::app()->ctx->posts->getURL(),
], ],
html::escapeHTML($w->permalink_str) Html::escapeHTML($w->permalink_str)
) )
); );
} }
@ -567,7 +567,7 @@ class Widgets
(bool) $w->content_only, (bool) $w->content_only,
'postinfowidget ' . $w->class, 'postinfowidget ' . $w->class,
'', '',
($w->title ? $w->renderTitle(html::escapeHTML($w->title)) : '') . ($w->title ? $w->renderTitle(Html::escapeHTML($w->title)) : '') .
sprintf('<ul>%s</ul>', $content) sprintf('<ul>%s</ul>', $content)
); );
} }
@ -597,7 +597,7 @@ class Widgets
} }
$l = '<a href="%s" title="%s">%s</a>'; $l = '<a href="%s" title="%s">%s</a>';
$u = $rs->getURL(); $u = $rs->getURL();
$e = html::escapeHTML($rs->f('post_title')); $e = Html::escapeHTML($rs->f('post_title'));
return str_replace( return str_replace(
['%T', '%F'], ['%T', '%F'],