From d23d639006a2e3ba050dcab64f72d243afd64f93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Calvi=C3=B1o=20S=C3=A1nchez?= Date: Wed, 25 Mar 2026 08:59:00 +0100 Subject: [PATCH 1/3] fix: Fix handling of "enableScripting" data attribute MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In PHP, a boolean is converted to a string as either "1" or "" rather than to "true" or "false". Moreover, the value of the data attribute is always returned as a string in JavaScript, so it never matched a strict comparison against a boolean value. It would be possible to fix this by comparing against "1" in Javascript. However, for clarity (and given that semantically an existing data attribute would be considered a boolean true if present, even if empty), now the "enableScripting" data attribute is explicitly set to either "true" or "false" and the comparison in JavaScript is done against a string "true". Signed-off-by: Daniel Calviño Sánchez --- src/views/PDFView.vue | 2 +- templates/viewer.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/PDFView.vue b/src/views/PDFView.vue index 1e84cc41..c55afea5 100644 --- a/src/views/PDFView.vue +++ b/src/views/PDFView.vue @@ -155,7 +155,7 @@ export default { PDFViewerApplicationOptions.set('sandboxBundleSrc', this.getViewerTemplateParameter('sandbox')) PDFViewerApplicationOptions.set('enablePermissions', true) PDFViewerApplicationOptions.set('imageResourcesPath', this.getViewerTemplateParameter('imageresourcespath')) - PDFViewerApplicationOptions.set('enableScripting', this.getViewerTemplateParameter('enableScripting') === true) + PDFViewerApplicationOptions.set('enableScripting', this.getViewerTemplateParameter('enableScripting') === 'true') const language = getLanguage() const supportedLanguages = SUPPORTED_LANGUAGES diff --git a/templates/viewer.php b/templates/viewer.php index e7b85be7..ddfcf7e1 100644 --- a/templates/viewer.php +++ b/templates/viewer.php @@ -40,7 +40,7 @@ --> From 81eed5501cc8867d119cb61424fb2f89f614037e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Calvi=C3=B1o=20S=C3=A1nchez?= Date: Wed, 25 Mar 2026 08:59:43 +0100 Subject: [PATCH 2/3] fix: Rename data attribute to lower case for consistency with others MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Daniel Calviño Sánchez --- src/views/PDFView.vue | 2 +- templates/viewer.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/PDFView.vue b/src/views/PDFView.vue index c55afea5..ee1f3dd2 100644 --- a/src/views/PDFView.vue +++ b/src/views/PDFView.vue @@ -155,7 +155,7 @@ export default { PDFViewerApplicationOptions.set('sandboxBundleSrc', this.getViewerTemplateParameter('sandbox')) PDFViewerApplicationOptions.set('enablePermissions', true) PDFViewerApplicationOptions.set('imageResourcesPath', this.getViewerTemplateParameter('imageresourcespath')) - PDFViewerApplicationOptions.set('enableScripting', this.getViewerTemplateParameter('enableScripting') === 'true') + PDFViewerApplicationOptions.set('enableScripting', this.getViewerTemplateParameter('enablescripting') === 'true') const language = getLanguage() const supportedLanguages = SUPPORTED_LANGUAGES diff --git a/templates/viewer.php b/templates/viewer.php index ddfcf7e1..7dbb6d04 100644 --- a/templates/viewer.php +++ b/templates/viewer.php @@ -40,7 +40,7 @@ --> From cc50d13914d499d940d9b52794d30f67dbe7cc25 Mon Sep 17 00:00:00 2001 From: nextcloud-command Date: Wed, 25 Mar 2026 08:21:52 +0000 Subject: [PATCH 3/3] chore(assets): Recompile assets Signed-off-by: nextcloud-command