@wdprlib/render 1.3.2 → 1.4.0

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.
package/dist/index.cjs CHANGED
@@ -833,7 +833,7 @@ function renderLink(ctx, data) {
833
833
  const attrs = [`href="${escapeAttr(href)}"`];
834
834
  if (data.type === "page" && typeof data.link === "object") {
835
835
  const page = data.link.page;
836
- const isSpecialPage = page.startsWith("//") || page.includes(":") || page.includes("#/");
836
+ const isSpecialPage = page.startsWith("//") || page.includes("#/");
837
837
  if (!isSpecialPage) {
838
838
  const hashIdx = page.indexOf("#");
839
839
  const pageToCheck = hashIdx !== -1 ? page.slice(0, hashIdx) : page;
@@ -4314,7 +4314,9 @@ var SANITIZE_CONFIG = {
4314
4314
  allowedTags: ["iframe"],
4315
4315
  allowedAttributes: {
4316
4316
  iframe: [
4317
+ "class",
4317
4318
  "src",
4319
+ "style",
4318
4320
  "allow",
4319
4321
  "allowfullscreen",
4320
4322
  "frameborder",
package/dist/index.js CHANGED
@@ -781,7 +781,7 @@ function renderLink(ctx, data) {
781
781
  const attrs = [`href="${escapeAttr(href)}"`];
782
782
  if (data.type === "page" && typeof data.link === "object") {
783
783
  const page = data.link.page;
784
- const isSpecialPage = page.startsWith("//") || page.includes(":") || page.includes("#/");
784
+ const isSpecialPage = page.startsWith("//") || page.includes("#/");
785
785
  if (!isSpecialPage) {
786
786
  const hashIdx = page.indexOf("#");
787
787
  const pageToCheck = hashIdx !== -1 ? page.slice(0, hashIdx) : page;
@@ -4262,7 +4262,9 @@ var SANITIZE_CONFIG = {
4262
4262
  allowedTags: ["iframe"],
4263
4263
  allowedAttributes: {
4264
4264
  iframe: [
4265
+ "class",
4265
4266
  "src",
4267
+ "style",
4266
4268
  "allow",
4267
4269
  "allowfullscreen",
4268
4270
  "frameborder",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wdprlib/render",
3
- "version": "1.3.2",
3
+ "version": "1.4.0",
4
4
  "description": "HTML renderer for Wikidot markup",
5
5
  "keywords": [
6
6
  "html",