mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-02-08 23:20:03 +00:00
parent
0f7ce7b67f
commit
e237d8fa97
@ -30,7 +30,7 @@ function Server(options) {
|
|||||||
this.routes = options.routes || [];
|
this.routes = options.routes || [];
|
||||||
this.authenticators = options.authenticators || [];
|
this.authenticators = options.authenticators || [];
|
||||||
this.wiki = options.wiki;
|
this.wiki = options.wiki;
|
||||||
this.servername = this.wiki.getTiddlerText("$:/SiteTitle") || "TiddlyWiki5";
|
this.servername = $tw.utils.transliterateToSafeASCII(this.wiki.getTiddlerText("$:/SiteTitle") || "TiddlyWiki5");
|
||||||
// Initialise the variables
|
// Initialise the variables
|
||||||
this.variables = $tw.utils.extend({},this.defaultVariables);
|
this.variables = $tw.utils.extend({},this.defaultVariables);
|
||||||
if(options.variables) {
|
if(options.variables) {
|
||||||
|
@ -916,4 +916,10 @@ exports.transliterate = function(str) {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
exports.transliterateToSafeASCII = function(str) {
|
||||||
|
return str.replace(/[^\x00-\x7F]/g,function(ch) {
|
||||||
|
return exports.transliterationPairs[ch] || ""
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
})();
|
})();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user