[#6982] disable separator escaping for the page title
This commit is contained in:
+1
-1
@@ -69,7 +69,7 @@
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>{CommonHelper.joinNonEmpty([$pageTitle, $appName, "PocketBase"], " - ")}</title>
|
||||
<title>{CommonHelper.joinNonEmpty([$pageTitle, $appName, "PocketBase"], " - ", false)}</title>
|
||||
|
||||
{#if window.location.protocol == "https:"}
|
||||
<link
|
||||
|
||||
@@ -743,11 +743,12 @@ export default class CommonHelper {
|
||||
/**
|
||||
* Returns a concatenated `items` string.
|
||||
*
|
||||
* @param {String} items
|
||||
* @param {String} [separator]
|
||||
* @param {String} items
|
||||
* @param {String} [separator]
|
||||
* @param {Boolean} [escapeSeparator]
|
||||
* @return {Array}
|
||||
*/
|
||||
static joinNonEmpty(items, separator = ", ") {
|
||||
static joinNonEmpty(items, separator = ", ", escapeSeparator = true) {
|
||||
items = items || [];
|
||||
|
||||
const result = [];
|
||||
@@ -756,9 +757,11 @@ export default class CommonHelper {
|
||||
|
||||
for (let item of items) {
|
||||
item = typeof item === "string" ? item.trim() : "";
|
||||
if (!CommonHelper.isEmpty(item)) {
|
||||
result.push(item.replaceAll(trimmedSeparator, "\\" + trimmedSeparator));
|
||||
if (CommonHelper.isEmpty(item)) {
|
||||
continue;
|
||||
}
|
||||
item = escapeSeparator ? item.replaceAll(trimmedSeparator, "\\" + trimmedSeparator) : item;
|
||||
result.push(item);
|
||||
}
|
||||
|
||||
return result.join(separator);
|
||||
|
||||
Reference in New Issue
Block a user