diff --git a/templates/default/bookdetail.html b/templates/default/bookdetail.html index fd54642..83f4b84 100644 --- a/templates/default/bookdetail.html +++ b/templates/default/bookdetail.html @@ -15,24 +15,24 @@
{{~}} -

{{=htmlEscape (it.title)}}

+

{{=htmlspecialchars (it.title)}}

{{=it.const.i18n.authorsTitle}}:

{{~it.book.authors:author:i}} - {{? i > 0}}, {{?}}{{=htmlEscape (author.name)}} + {{? i > 0}}, {{?}}{{=htmlspecialchars (author.name)}} {{~}}

{{? it.book.tagsName != ""}}

{{=it.const.i18n.tagsTitle}}:

{{~it.book.tags:tag:i}} - {{? i > 0}}, {{?}}{{=htmlEscape (tag.name)}} + {{? i > 0}}, {{?}}{{=htmlspecialchars (tag.name)}} {{~}}

{{?}} {{? it.book.seriesName != ""}}

-

{{=it.const.i18n.seriesTitle}} :

{{=htmlEscape (it.book.seriesCompleteName)}} +

{{=it.const.i18n.seriesTitle}} :

{{=htmlspecialchars (it.book.seriesCompleteName)}}

{{?}} {{? it.book.pubDate != ""}} diff --git a/templates/default/main.html b/templates/default/main.html index 52981c2..517583c 100644 --- a/templates/default/main.html +++ b/templates/default/main.html @@ -11,7 +11,7 @@
{{? entry.navlink != "#"}}{{?}} -

{{=htmlEscape (entry.title)}}

+

{{=htmlspecialchars (entry.title)}}

{{=entry.content}}

{{? entry.navlink != "#"}}
{{?}}
@@ -20,8 +20,8 @@
{{? entry.book.hasCover == 1}} - - {{=it.const.i18n.coverAlt}} + + {{=it.const.i18n.coverAlt}} {{?}} @@ -30,15 +30,15 @@ {{=data.name}}
{{~}} - +
-

{{=htmlEscape (entry.title)}} +

{{=htmlspecialchars (entry.title)}} {{? entry.book.pubDate != ""}}({{=entry.book.pubDate}}){{?}} {{? entry.book.rating != ""}}{{=entry.book.rating}}{{?}}

-

{{=it.const.i18n.authorsTitle}} :

{{=htmlEscape (entry.book.authorsName)}}
- {{? entry.book.tagsName != ""}}

{{=it.const.i18n.tagsTitle}} :

{{=htmlEscape (entry.book.tagsName)}}
{{?}} - {{? entry.book.seriesName != ""}}

{{=it.const.i18n.seriesTitle}} :

{{=htmlEscape (entry.book.seriesName)}} ({{=entry.book.seriesIndex}})
{{?}} +

{{=it.const.i18n.authorsTitle}} :

{{=htmlspecialchars (entry.book.authorsName)}}
+ {{? entry.book.tagsName != ""}}

{{=it.const.i18n.tagsTitle}} :

{{=htmlspecialchars (entry.book.tagsName)}}
{{?}} + {{? entry.book.seriesName != ""}}

{{=it.const.i18n.seriesTitle}} :

{{=htmlspecialchars (entry.book.seriesName)}} ({{=entry.book.seriesIndex}})
{{?}}
{{?}} diff --git a/util.js b/util.js index 3a0a717..a5a0739 100644 --- a/util.js +++ b/util.js @@ -69,7 +69,7 @@ function sendToMailAddress (component, dataid) { $.ajax ({'url': url, 'type': 'post', 'data': { 'data': dataid, 'email': email }, 'success': retourMail}); } -function strformat () { +function str_format () { var s = arguments[0]; for (var i = 0; i < arguments.length - 1; i++) { var reg = new RegExp("\\{" + i + "\\}", "gm"); @@ -92,7 +92,7 @@ function getCurrentOption (option) { return $.cookie (option); } -function htmlEscape(str) { +function htmlspecialchars(str) { return String(str) .replace(/&/g, '&') .replace(/"/g, '"') @@ -346,7 +346,7 @@ function search_Submitted (event) { return; } event.preventDefault(); - var url = strformat ("index.php?page=9¤t={0}&query={1}&db={2}", currentData.page, $("input[name=query]").val (), currentData.databaseId); + var url = str_format ("index.php?page=9¤t={0}&query={1}&db={2}", currentData.page, $("input[name=query]").val (), currentData.databaseId); navigateTo (url); }