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 => encodeURIComponent(value),
16997
- "decode-uri": value => decodeURIComponent(value),
16998
- "encode-uri-component": value => encodeURI(value),
16999
- "decode-uri-component": value => decodeURI(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) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "single-file-core",
3
- "version": "1.2.19",
3
+ "version": "1.2.20",
4
4
  "description": "SingleFile Core",
5
5
  "author": "Gildas Lormeau",
6
6
  "license": "AGPL-3.0-or-later",