N°4367 Replace uses of utils.js EncodeHtml()

This commit is contained in:
Pierre Goiffon
2021-10-19 08:48:43 +02:00
parent f4856150ed
commit 216e62c448

View File

@@ -104,8 +104,7 @@ $(function()
{
sIconSpec = '<span class="ibo-breadcrumbs--item-icon"><span class="'+oEntry['icon']+'"/></span></span>';
}
else if (oEntry['icon'].length > 0)
{
else if (oEntry['icon'].length > 0) {
// Mind the empty "alt" attribute https://www.w3.org/WAI/tutorials/images/decorative/
sIconSpec = '<span class="ibo-breadcrumbs--item-icon"><img src="'+oEntry['icon']+'" alt=""/></span>';
}
@@ -115,10 +114,10 @@ $(function()
if (sTitle.length === 0) {
sTitle = sLabel;
}
sTitle = EncodeHtml(sTitle, false);
sLabel = EncodeHtml(sLabel, false);
sTitle = CombodoSanitizer.EscapeHtml(sTitle, false);
sLabel = CombodoSanitizer.EscapeHtml(sLabel, false);
if ((this.options.new_entry !== null) && (iEntry === aBreadCrumb.length - 1)) {
if ((this.options.new_entry !== null) && (iEntry === aBreadCrumb.length-1)) {
// Last entry is the current page
sBreadcrumbsItemHtml += '<span class="ibo-is-current" data-role="" data-breadcrumb-entry-number="'+iEntry+'" title="'+sTitle+'">'+sIconSpec+'<span class="ibo-breadcrumbs--item-label">'+sLabel+'</span></span>';
} else {