mirror of
https://github.com/Jermolene/TiddlyWiki5.git
synced 2026-02-19 06:31:48 -08:00
parent
0f7ce7b67f
commit
e237d8fa97
2 changed files with 7 additions and 1 deletions
|
|
@ -30,7 +30,7 @@ function Server(options) {
|
|||
this.routes = options.routes || [];
|
||||
this.authenticators = options.authenticators || [];
|
||||
this.wiki = options.wiki;
|
||||
this.servername = this.wiki.getTiddlerText("$:/SiteTitle") || "TiddlyWiki5";
|
||||
this.servername = $tw.utils.transliterateToSafeASCII(this.wiki.getTiddlerText("$:/SiteTitle") || "TiddlyWiki5");
|
||||
// Initialise the variables
|
||||
this.variables = $tw.utils.extend({},this.defaultVariables);
|
||||
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…
Add table
Add a link
Reference in a new issue