single-file-core 1.2.19 → 1.2.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -16992,11 +16992,11 @@ async function evalTemplate(template = "", options, util, content, doc, dontRepl
|
|
|
16992
16992
|
const subdomains = urlSubDomains.split(".");
|
|
16993
16993
|
return subdomains[subdomains.length - index - 1];
|
|
16994
16994
|
},
|
|
16995
|
-
"stringify": value => JSON.stringify(value),
|
|
16996
|
-
"encode-uri": value =>
|
|
16997
|
-
"decode-uri": value =>
|
|
16998
|
-
"encode-uri-component": value =>
|
|
16999
|
-
"decode-uri-component": value =>
|
|
16995
|
+
"stringify": value => { try { return JSON.stringify(value); } catch (error) { return value; } },
|
|
16996
|
+
"encode-uri": value => { try { return encodeURI(value); } catch (error) { return value; } },
|
|
16997
|
+
"decode-uri": value => { try { return decodeURI(value); } catch (error) { return value; } },
|
|
16998
|
+
"encode-uri-component": value => { try { return encodeURIComponent(value); } catch (error) { return value; } },
|
|
16999
|
+
"decode-uri-component": value => { try { return decodeURIComponent(value); } catch (error) { return value; } }
|
|
17000
17000
|
};
|
|
17001
17001
|
if (doc) {
|
|
17002
17002
|
functions["page-element-text"] = (selector) => {
|