mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-02-21 17:39:51 +00:00
Compare commits
9 Commits
v5.2.5
...
fix-crash-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
153cef5697 | ||
|
|
9f69161709 | ||
|
|
18d3ea9d14 | ||
|
|
95e6168839 | ||
|
|
73507ca8b5 | ||
|
|
4a6e3d4281 | ||
|
|
a5afed9384 | ||
|
|
b37a356b5e | ||
|
|
55d9a5e16d |
@@ -5,7 +5,7 @@
|
||||
# Default to the current version number for building the plugin library
|
||||
|
||||
if [ -z "$TW5_BUILD_VERSION" ]; then
|
||||
TW5_BUILD_VERSION=v5.2.5
|
||||
TW5_BUILD_VERSION=v5.2.6
|
||||
fi
|
||||
|
||||
echo "Using TW5_BUILD_VERSION as [$TW5_BUILD_VERSION]"
|
||||
|
||||
@@ -1881,7 +1881,7 @@ A default set of files for TiddlyWiki to ignore during load.
|
||||
This matches what NPM ignores, and adds "*.meta" to ignore tiddler
|
||||
metadata files.
|
||||
*/
|
||||
$tw.boot.excludeRegExp = /^\.DS_Store$|^.*\.meta$|^\..*\.swp$|^\._.*$|^\.git$|^\.hg$|^\.lock-wscript$|^\.svn$|^\.wafpickle-.*$|^CVS$|^npm-debug\.log$/;
|
||||
$tw.boot.excludeRegExp = /^\.DS_Store$|^.*\.meta$|^\..*\.swp$|^\._.*$|^\.git$|^\.github$|^\.vscode$|^\.hg$|^\.lock-wscript$|^\.svn$|^\.wafpickle-.*$|^CVS$|^npm-debug\.log$/;
|
||||
|
||||
/*
|
||||
Load all the tiddlers recursively from a directory, including honouring `tiddlywiki.files` files for drawing in external files. Returns an array of {filepath:,type:,tiddlers: [{..fields...}],hasMetaFile:}. Note that no file information is returned for externally loaded tiddlers, just the `tiddlers` property.
|
||||
|
||||
@@ -21,6 +21,7 @@ exports.handler = function(request,response,state) {
|
||||
username: state.authenticatedUsername || state.server.get("anon-username") || "",
|
||||
anonymous: !state.authenticatedUsername,
|
||||
read_only: !state.server.isAuthorized("writers",state.authenticatedUsername),
|
||||
logout_is_available: false,
|
||||
space: {
|
||||
recipe: "default"
|
||||
},
|
||||
|
||||
@@ -687,7 +687,7 @@ exports.escapeRegExp = function(s) {
|
||||
|
||||
// Checks whether a link target is external, i.e. not a tiddler title
|
||||
exports.isLinkExternal = function(to) {
|
||||
var externalRegExp = /^(?:file|http|https|mailto|ftp|irc|news|data|skype):[^\s<>{}\[\]`|"\\^]+(?:\/|\b)/i;
|
||||
var externalRegExp = /^(?:file|http|https|mailto|ftp|irc|news|obsidian|data|skype):[^\s<>{}\[\]`|"\\^]+(?:\/|\b)/i;
|
||||
return externalRegExp.test(to);
|
||||
};
|
||||
|
||||
|
||||
@@ -34,6 +34,10 @@ ElementWidget.prototype.render = function(parent,nextSibling) {
|
||||
if($tw.config.htmlUnsafeElements.indexOf(this.tag) !== -1) {
|
||||
this.tag = "safe-" + this.tag;
|
||||
}
|
||||
// Restrict tag name to digits, letts and dashes
|
||||
this.tag = this.tag.replace(/[^0-9a-zA-Z\-]/mg,"");
|
||||
// Default to a span
|
||||
this.tag = this.tag || "span";
|
||||
// Adjust headings by the current base level
|
||||
var headingLevel = ["h1","h2","h3","h4","h5","h6"].indexOf(this.tag);
|
||||
if(headingLevel !== -1) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
title: $:/config/OfficialPluginLibrary
|
||||
tags: $:/tags/PluginLibrary
|
||||
url: https://tiddlywiki.com/library/v5.2.5/index.html
|
||||
url: https://tiddlywiki.com/library/v5.2.6/index.html
|
||||
caption: {{$:/language/OfficialPluginLibrary}}
|
||||
|
||||
{{$:/language/OfficialPluginLibrary/Hint}}
|
||||
|
||||
@@ -8,19 +8,19 @@
|
||||
],
|
||||
"build": {
|
||||
"index": [
|
||||
"--rendertiddler","$:/core/save/all","index.html","text/plain"],
|
||||
"--render","$:/core/save/all","index.html","text/plain"],
|
||||
"empty": [
|
||||
"--rendertiddler","$:/core/save/all","empty.html","text/plain",
|
||||
"--rendertiddler","$:/core/save/all","empty.hta","text/plain"],
|
||||
"--render","$:/core/save/all","empty.html","text/plain",
|
||||
"--render","$:/core/save/all","empty.hta","text/plain"],
|
||||
"externalimages": [
|
||||
"--savetiddlers","[is[image]]","images",
|
||||
"--setfield","[is[image]]","_canonical_uri","$:/core/templates/canonical-uri-external-image","text/plain",
|
||||
"--setfield","[is[image]]","text","","text/plain",
|
||||
"--rendertiddler","$:/core/save/all","externalimages.html","text/plain"],
|
||||
"--render","$:/core/save/all","externalimages.html","text/plain"],
|
||||
"static": [
|
||||
"--rendertiddler","$:/core/templates/static.template.html","static.html","text/plain",
|
||||
"--rendertiddler","$:/core/templates/alltiddlers.template.html","alltiddlers.html","text/plain",
|
||||
"--rendertiddlers","[!is[system]]","$:/core/templates/static.tiddler.html","static","text/plain",
|
||||
"--rendertiddler","$:/core/templates/static.template.css","static/static.css","text/plain"]
|
||||
"--render","$:/core/templates/static.template.html","static.html","text/plain",
|
||||
"--render","$:/core/templates/alltiddlers.template.html","alltiddlers.html","text/plain",
|
||||
"--render","[!is[system]]","[encodeuricomponent[]addprefix[static/]addsuffix[.html]]","text/plain",
|
||||
"--render","$:/core/templates/static.template.css","static/static.css","text/plain"]
|
||||
}
|
||||
}
|
||||
@@ -11,11 +11,11 @@
|
||||
],
|
||||
"build": {
|
||||
"index": [
|
||||
"--rendertiddler","$:/core/save/all","highlightdemo.html","text/plain"],
|
||||
"--render","$:/core/save/all","highlightdemo.html","text/plain"],
|
||||
"static": [
|
||||
"--rendertiddler","$:/core/templates/static.template.html","static.html","text/plain",
|
||||
"--rendertiddler","$:/core/templates/alltiddlers.template.html","alltiddlers.html","text/plain",
|
||||
"--rendertiddlers","[!is[system]]","$:/core/templates/static.tiddler.html","static","text/plain",
|
||||
"--rendertiddler","$:/core/templates/static.template.css","static/static.css","text/plain"]
|
||||
"--render","$:/core/templates/static.template.html","static.html","text/plain",
|
||||
"--render","$:/core/templates/alltiddlers.template.html","alltiddlers.html","text/plain",
|
||||
"--render","[!is[system]]","[encodeuricomponent[]addprefix[static/]addsuffix[.html]]","text/plain",
|
||||
"--render","$:/core/templates/static.template.css","static/static.css","text/plain"]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,11 +11,11 @@
|
||||
],
|
||||
"build": {
|
||||
"index": [
|
||||
"--rendertiddler","$:/core/save/all","katexdemo.html","text/plain"],
|
||||
"--render","$:/core/save/all","katexdemo.html","text/plain"],
|
||||
"static": [
|
||||
"--rendertiddler","$:/core/templates/static.template.html","static.html","text/plain",
|
||||
"--rendertiddler","$:/core/templates/alltiddlers.template.html","alltiddlers.html","text/plain",
|
||||
"--rendertiddlers","[!is[system]]","$:/core/templates/static.tiddler.html","static","text/plain",
|
||||
"--rendertiddler","$:/core/templates/static.template.css","static/static.css","text/plain"]
|
||||
"--render","$:/core/templates/static.template.html","static.html","text/plain",
|
||||
"--render","$:/core/templates/alltiddlers.template.html","alltiddlers.html","text/plain",
|
||||
"--render","[!is[system]]","[encodeuricomponent[]addprefix[static/]addsuffix[.html]]","text/plain",
|
||||
"--render","$:/core/templates/static.template.css","static/static.css","text/plain"]
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ title: Release 5.2.6
|
||||
type: text/vnd.tiddlywiki
|
||||
|
||||
//[[See GitHub for detailed change history of this release|https://github.com/Jermolene/TiddlyWiki5/compare/v5.2.5...master]]//
|
||||
|
||||
! Major Improvements
|
||||
|
||||
New [ext[Twitter Archivist|./editions/twitter-archivist]] plugin to import the tweets and associated media from a Twitter Archive as individual tiddlers.
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
title: $:/config/OfficialPluginLibrary
|
||||
tags: $:/tags/PluginLibrary
|
||||
url: https://tiddlywiki.com/prerelease/library/v5.2.5/index.html
|
||||
url: https://tiddlywiki.com/prerelease/library/v5.2.6/index.html
|
||||
caption: {{$:/language/OfficialPluginLibrary}} (Prerelease)
|
||||
|
||||
The prerelease version of the official ~TiddlyWiki plugin library at tiddlywiki.com. Plugins, themes and language packs are maintained by the core team.
|
||||
|
||||
@@ -13,13 +13,13 @@
|
||||
"listen": [
|
||||
"--listen","root-tiddler=$:/core/save/all-external-js","use-browser-cache=yes"],
|
||||
"index": [
|
||||
"--rendertiddler","$:/core/save/offline-external-js","index.html","text/plain",
|
||||
"--render","$:/core/save/offline-external-js","index.html","text/plain",
|
||||
"--render","$:/core/templates/tiddlywiki5.js","[[tiddlywikicore-]addsuffix<version>addsuffix[.js]]","text/plain"],
|
||||
"static": [
|
||||
"--rendertiddler","$:/core/templates/static.template.html","static.html","text/plain",
|
||||
"--rendertiddler","$:/core/templates/alltiddlers.template.html","alltiddlers.html","text/plain",
|
||||
"--rendertiddlers","[!is[system]]","$:/core/templates/static.tiddler.html","static","text/plain",
|
||||
"--rendertiddler","$:/core/templates/static.template.css","static/static.css","text/plain"],
|
||||
"--render","$:/core/templates/static.template.html","static.html","text/plain",
|
||||
"--render","$:/core/templates/alltiddlers.template.html","alltiddlers.html","text/plain",
|
||||
"--render","[!is[system]]","[encodeuricomponent[]addprefix[static/]addsuffix[.html]]","text/plain",
|
||||
"--render","$:/core/templates/static.template.css","static/static.css","text/plain"],
|
||||
"tiddlywikicore": [
|
||||
"--render","$:/core/templates/tiddlywiki5.js","[[tiddlywikicore-]addsuffix<version>addsuffix[.js]]","text/plain"]
|
||||
}
|
||||
|
||||
@@ -11,11 +11,11 @@
|
||||
],
|
||||
"build": {
|
||||
"index": [
|
||||
"--rendertiddler","$:/plugins/tiddlywiki/tiddlyweb/save/offline","index.html","text/plain"],
|
||||
"--render","$:/plugins/tiddlywiki/tiddlyweb/save/offline","index.html","text/plain"],
|
||||
"static": [
|
||||
"--rendertiddler","$:/core/templates/static.template.html","static.html","text/plain",
|
||||
"--rendertiddler","$:/core/templates/alltiddlers.template.html","alltiddlers.html","text/plain",
|
||||
"--rendertiddlers","[!is[system]]","$:/core/templates/static.tiddler.html","static","text/plain",
|
||||
"--rendertiddler","$:/core/templates/static.template.css","static/static.css","text/plain"]
|
||||
"--render","$:/core/templates/static.template.html","static.html","text/plain",
|
||||
"--render","$:/core/templates/alltiddlers.template.html","alltiddlers.html","text/plain",
|
||||
"--render","[!is[system]]","[encodeuricomponent[]addprefix[static/]addsuffix[.html]]","text/plain",
|
||||
"--render","$:/core/templates/static.template.css","static/static.css","text/plain"]
|
||||
}
|
||||
}
|
||||
@@ -15,14 +15,14 @@
|
||||
"--savetiddlers","[tag[external-image]]","images",
|
||||
"--setfield","[tag[external-image]]","_canonical_uri","$:/core/templates/canonical-uri-external-image","text/plain",
|
||||
"--setfield","[tag[external-image]]","text","","text/plain",
|
||||
"--rendertiddler","$:/core/save/all","index.html","text/plain"],
|
||||
"--render","$:/core/save/all","index.html","text/plain"],
|
||||
"favicon": [
|
||||
"--savetiddler","$:/favicon.ico","favicon.ico"],
|
||||
"static": [
|
||||
"--rendertiddler","$:/core/templates/static.template.html","static.html","text/plain",
|
||||
"--rendertiddler","$:/core/templates/alltiddlers.template.html","alltiddlers.html","text/plain",
|
||||
"--rendertiddlers","[!is[system]]","$:/core/templates/static.tiddler.html","static","text/plain",
|
||||
"--rendertiddler","$:/core/templates/static.template.css","static/static.css","text/plain"]
|
||||
"--render","$:/core/templates/static.template.html","static.html","text/plain",
|
||||
"--render","$:/core/templates/alltiddlers.template.html","alltiddlers.html","text/plain",
|
||||
"--render","[!is[system]]","[encodeuricomponent[]addprefix[static/]addsuffix[.html]]","text/plain","$:/core/templates/static.tiddler.html",
|
||||
"--render","$:/core/templates/static.template.css","static/static.css","text/plain"]
|
||||
},
|
||||
"config": {
|
||||
"retain-original-tiddler-path": true
|
||||
|
||||
@@ -10,6 +10,6 @@
|
||||
],
|
||||
"build": {
|
||||
"index": [
|
||||
"--rendertiddler","$:/core/save/all","index.html","text/plain"]
|
||||
"--render","$:/core/save/all","index.html","text/plain"]
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 68 KiB |
@@ -25,6 +25,7 @@ The JSON data returned comprises the following properties:
|
||||
* ''username'' - the username of the currently authenticated user. If undefined, the [[WebServer Parameter: anon-username]] is returned instead
|
||||
* ''anonymous'' - true if the current user is anonymous
|
||||
* ''read_only'' - true if the current user is restricted to read only access to the server
|
||||
* ''logout_is_available'' - true if the server supports logging out (optional, defaults to true)
|
||||
* ''space'' - always contains the object `{recipe: "default"}`
|
||||
* ''tiddlywiki_version'' - the current TiddlyWiki version
|
||||
|
||||
|
||||
@@ -24,35 +24,35 @@
|
||||
"build": {
|
||||
"index": [
|
||||
"--savetiddlers","[tag[external-image]]","images",
|
||||
"--rendertiddlers","[tag[external-text]]","$:/core/templates/tid-tiddler","text","text/plain",".tid",
|
||||
"--render","[tag[external-text]]","[encodeuricomponent[]addprefix[text/]addsuffix[.tid]]","text/plain","$:/core/templates/tid-tiddler",
|
||||
"--setfield","[tag[external-image]]","_canonical_uri","$:/core/templates/canonical-uri-external-image","text/plain",
|
||||
"--setfield","[tag[external-text]]","_canonical_uri","$:/core/templates/canonical-uri-external-text","text/plain",
|
||||
"--setfield","[tag[external-image]] [tag[external-text]]","text","","text/plain",
|
||||
"--rendertiddler","$:/core/save/all","index.html","text/plain"],
|
||||
"--render","$:/core/save/all","index.html","text/plain"],
|
||||
"empty": [
|
||||
"--rendertiddler","$:/editions/tw5.com/download-empty","empty.html","text/plain",
|
||||
"--rendertiddler","$:/editions/tw5.com/download-empty","empty.hta","text/plain"],
|
||||
"--render","$:/editions/tw5.com/download-empty","empty.html","text/plain",
|
||||
"--render","$:/editions/tw5.com/download-empty","empty.hta","text/plain"],
|
||||
"encrypted": [
|
||||
"--password", "password",
|
||||
"--rendertiddler", "$:/core/save/all", "encrypted.html", "text/plain",
|
||||
"--render", "$:/core/save/all", "encrypted.html", "text/plain",
|
||||
"--clearpassword"],
|
||||
"favicon": [
|
||||
"--savetiddler","$:/favicon.ico","favicon.ico",
|
||||
"--savetiddler","$:/green_favicon.ico","static/favicon.ico"],
|
||||
"readmes": [
|
||||
"--rendertiddler","ReadMe","readme.md","text/html",
|
||||
"--rendertiddler","ReadMeBinFolder","bin/readme.md","text/html",
|
||||
"--rendertiddler","ContributingTemplate","contributing.md","text/html",
|
||||
"--rendertiddler","$:/core/copyright.txt","license","text/plain"],
|
||||
"--render","ReadMe","readme.md","text/html",
|
||||
"--render","ReadMeBinFolder","bin/readme.md","text/html",
|
||||
"--render","ContributingTemplate","contributing.md","text/html",
|
||||
"--render","$:/core/copyright.txt","license","text/plain"],
|
||||
"tw2": [
|
||||
"--rendertiddler","TiddlyWiki2ReadMe","tw2/readme.md","text/html"],
|
||||
"--render","TiddlyWiki2ReadMe","tw2/readme.md","text/html"],
|
||||
"static": [
|
||||
"--rendertiddler","$:/core/templates/static.template.html","static.html","text/plain",
|
||||
"--rendertiddler","$:/core/templates/alltiddlers.template.html","alltiddlers.html","text/plain",
|
||||
"--rendertiddlers","[!is[system]]","$:/core/templates/static.tiddler.html","static","text/plain",
|
||||
"--rendertiddler","$:/core/templates/static.template.css","static/static.css","text/plain"],
|
||||
"--render","$:/core/templates/static.template.html","static.html","text/plain",
|
||||
"--render","$:/core/templates/alltiddlers.template.html","alltiddlers.html","text/plain",
|
||||
"--render","[!is[system]]","[encodeuricomponent[]addprefix[static/]addsuffix[.html]]","text/plain","$:/core/templates/static.tiddler.html",
|
||||
"--render","$:/core/templates/static.template.css","static/static.css","text/plain"],
|
||||
"external-js": [
|
||||
"--rendertiddler","$:/core/save/offline-external-js","index.html","text/plain",
|
||||
"--render","$:/core/save/offline-external-js","index.html","text/plain",
|
||||
"--render","$:/core/templates/tiddlywiki5.js","[[tiddlywikicore-]addsuffix<version>addsuffix[.js]]","text/plain"]
|
||||
},
|
||||
"config": {
|
||||
|
||||
@@ -11,6 +11,6 @@
|
||||
],
|
||||
"build": {
|
||||
"index": [
|
||||
"--rendertiddler","$:/core/save/all","index.html","text/plain"]
|
||||
"--render","$:/core/save/all","index.html","text/plain"]
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "tiddlywiki",
|
||||
"preferGlobal": "true",
|
||||
"version": "5.2.5",
|
||||
"version": "5.2.6-prerelease",
|
||||
"author": "Jeremy Ruston <jeremy@jermolene.com>",
|
||||
"description": "a non-linear personal web notebook",
|
||||
"contributors": [
|
||||
|
||||
@@ -23,6 +23,7 @@ function TiddlyWebAdaptor(options) {
|
||||
this.logger = new $tw.utils.Logger("TiddlyWebAdaptor");
|
||||
this.isLoggedIn = false;
|
||||
this.isReadOnly = false;
|
||||
this.logoutIsAvailable = true;
|
||||
}
|
||||
|
||||
TiddlyWebAdaptor.prototype.name = "tiddlyweb";
|
||||
@@ -91,6 +92,7 @@ TiddlyWebAdaptor.prototype.getStatus = function(callback) {
|
||||
self.isLoggedIn = json.username !== "GUEST";
|
||||
self.isReadOnly = !!json["read_only"];
|
||||
self.isAnonymous = !!json.anonymous;
|
||||
self.logoutIsAvailable = "logout_is_available" in json ? !!json["logout_is_available"] : true;
|
||||
}
|
||||
// Invoke the callback if present
|
||||
if(callback) {
|
||||
@@ -127,23 +129,28 @@ TiddlyWebAdaptor.prototype.login = function(username,password,callback) {
|
||||
/*
|
||||
*/
|
||||
TiddlyWebAdaptor.prototype.logout = function(callback) {
|
||||
var options = {
|
||||
url: this.host + "logout",
|
||||
type: "POST",
|
||||
data: {
|
||||
csrf_token: this.getCsrfToken(),
|
||||
tiddlyweb_redirect: "/status" // workaround to marginalize automatic subsequent GET
|
||||
},
|
||||
callback: function(err,data) {
|
||||
callback(err);
|
||||
},
|
||||
headers: {
|
||||
"accept": "application/json",
|
||||
"X-Requested-With": "TiddlyWiki"
|
||||
}
|
||||
};
|
||||
this.logger.log("Logging out:",options);
|
||||
$tw.utils.httpRequest(options);
|
||||
if(this.logoutIsAvailable) {
|
||||
var options = {
|
||||
url: this.host + "logout",
|
||||
type: "POST",
|
||||
data: {
|
||||
csrf_token: this.getCsrfToken(),
|
||||
tiddlyweb_redirect: "/status" // workaround to marginalize automatic subsequent GET
|
||||
},
|
||||
callback: function(err,data,xhr) {
|
||||
callback(err);
|
||||
},
|
||||
headers: {
|
||||
"accept": "application/json",
|
||||
"X-Requested-With": "TiddlyWiki"
|
||||
}
|
||||
};
|
||||
this.logger.log("Logging out:",options);
|
||||
$tw.utils.httpRequest(options);
|
||||
} else {
|
||||
alert("This server does not support logging out. If you are using basic authentication the only way to logout is close all browser windows");
|
||||
callback(null);
|
||||
}
|
||||
};
|
||||
|
||||
/*
|
||||
@@ -191,7 +198,7 @@ Save a tiddler and invoke the callback with (err,adaptorInfo,revision)
|
||||
TiddlyWebAdaptor.prototype.saveTiddler = function(tiddler,callback,options) {
|
||||
var self = this;
|
||||
if(this.isReadOnly) {
|
||||
return callback(null,options.tiddlerInfo.adaptorInfo);
|
||||
return callback(null);
|
||||
}
|
||||
$tw.utils.httpRequest({
|
||||
url: this.host + "recipes/" + encodeURIComponent(this.recipe) + "/tiddlers/" + encodeURIComponent(tiddler.fields.title),
|
||||
@@ -213,7 +220,7 @@ TiddlyWebAdaptor.prototype.saveTiddler = function(tiddler,callback,options) {
|
||||
// Invoke the callback
|
||||
callback(null,{
|
||||
bag: etagInfo.bag
|
||||
},etagInfo.revision);
|
||||
},etagInfo.revision);
|
||||
}
|
||||
}
|
||||
});
|
||||
@@ -244,7 +251,7 @@ tiddlerInfo: the syncer's tiddlerInfo for this tiddler
|
||||
TiddlyWebAdaptor.prototype.deleteTiddler = function(title,callback,options) {
|
||||
var self = this;
|
||||
if(this.isReadOnly) {
|
||||
return callback(null,options.tiddlerInfo.adaptorInfo);
|
||||
return callback(null);
|
||||
}
|
||||
// If we don't have a bag it means that the tiddler hasn't been seen by the server, so we don't need to delete it
|
||||
var bag = options.tiddlerInfo.adaptorInfo && options.tiddlerInfo.adaptorInfo.bag;
|
||||
|
||||
@@ -127,7 +127,7 @@ var insertMacroCall = function(w,output,macroName,paramString) {
|
||||
|
||||
|
||||
var isLinkExternal = function(to) {
|
||||
var externalRegExp = /(?:file|http|https|mailto|ftp|irc|news|data|skype):[^\s'"]+(?:\/|\b)/i;
|
||||
var externalRegExp = /(?:file|http|https|mailto|ftp|irc|news|obsidian|data|skype):[^\s'"]+(?:\/|\b)/i;
|
||||
return externalRegExp.test(to);
|
||||
};
|
||||
var rules = [
|
||||
|
||||
Reference in New Issue
Block a user