pptx-viewer-core 1.2.7 → 1.2.8
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/CHANGELOG.md +2 -0
- package/dist/cli/index.js +0 -0
- package/dist/cli/index.mjs +0 -0
- package/dist/index.js +17 -1
- package/dist/index.mjs +17 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,8 @@ All notable changes to this project are documented here.
|
|
|
4
4
|
This file is generated from [Conventional Commits](https://www.conventionalcommits.org)
|
|
5
5
|
by [git-cliff](https://git-cliff.org); do not edit it by hand.
|
|
6
6
|
|
|
7
|
+
## [1.2.7](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-viewer-core@1.2.7) - 2026-07-09
|
|
8
|
+
|
|
7
9
|
## [1.2.6](https://github.com/ChristopherVR/pptx-viewer/releases/tag/pptx-viewer-core@1.2.6) - 2026-07-09
|
|
8
10
|
|
|
9
11
|
### Other
|
package/dist/cli/index.js
CHANGED
|
Binary file
|
package/dist/cli/index.mjs
CHANGED
|
Binary file
|
package/dist/index.js
CHANGED
|
@@ -12185,6 +12185,19 @@ var PptxRuntimeDependencyFactory = class {
|
|
|
12185
12185
|
// More generally, OOXML element text is always an untyped string;
|
|
12186
12186
|
// downstream callers coerce where needed.
|
|
12187
12187
|
parseTagValue: false,
|
|
12188
|
+
// `<a:t>` run text must survive verbatim. PowerPoint frequently
|
|
12189
|
+
// splits a sentence across many runs (spell-check, autocorrect),
|
|
12190
|
+
// and a word boundary often ends up as its own run whose `<a:t>`
|
|
12191
|
+
// is a single space, e.g. `<a:r><a:t> </a:t></a:r>`.
|
|
12192
|
+
// fast-xml-parser's default `trimValues: true` trims that
|
|
12193
|
+
// whitespace-only text node down to `""`, silently dropping the
|
|
12194
|
+
// space and gluing the surrounding words together
|
|
12195
|
+
// ("so we immediately start" -> "soweimmediatelystart"). Turn
|
|
12196
|
+
// trimming off globally and re-apply it ourselves in
|
|
12197
|
+
// tagValueProcessor for every tag except `a:t`, so non-text
|
|
12198
|
+
// values (docProps, counters, etc.) keep their old trimmed
|
|
12199
|
+
// behaviour and no whitespace-only text node is lost.
|
|
12200
|
+
trimValues: false,
|
|
12188
12201
|
// Security hardening (Load M3): explicitly disable XML entity
|
|
12189
12202
|
// processing. PPTX XML never uses DOCTYPE / DTDs, so allowing
|
|
12190
12203
|
// entity expansion serves only as an attack surface
|
|
@@ -12199,7 +12212,10 @@ var PptxRuntimeDependencyFactory = class {
|
|
|
12199
12212
|
// they cannot trigger entity expansion, so the security guarantee
|
|
12200
12213
|
// above is preserved - so text nodes hold their real characters and
|
|
12201
12214
|
// the builder re-encodes them symmetrically on save.
|
|
12202
|
-
tagValueProcessor: (
|
|
12215
|
+
tagValueProcessor: (tagName, tagValue) => {
|
|
12216
|
+
const decoded = decodeXmlEntities(tagValue);
|
|
12217
|
+
return tagName === "a:t" ? decoded : decoded.trim();
|
|
12218
|
+
}
|
|
12203
12219
|
});
|
|
12204
12220
|
}
|
|
12205
12221
|
createBuilder() {
|
package/dist/index.mjs
CHANGED
|
@@ -12180,6 +12180,19 @@ var PptxRuntimeDependencyFactory = class {
|
|
|
12180
12180
|
// More generally, OOXML element text is always an untyped string;
|
|
12181
12181
|
// downstream callers coerce where needed.
|
|
12182
12182
|
parseTagValue: false,
|
|
12183
|
+
// `<a:t>` run text must survive verbatim. PowerPoint frequently
|
|
12184
|
+
// splits a sentence across many runs (spell-check, autocorrect),
|
|
12185
|
+
// and a word boundary often ends up as its own run whose `<a:t>`
|
|
12186
|
+
// is a single space, e.g. `<a:r><a:t> </a:t></a:r>`.
|
|
12187
|
+
// fast-xml-parser's default `trimValues: true` trims that
|
|
12188
|
+
// whitespace-only text node down to `""`, silently dropping the
|
|
12189
|
+
// space and gluing the surrounding words together
|
|
12190
|
+
// ("so we immediately start" -> "soweimmediatelystart"). Turn
|
|
12191
|
+
// trimming off globally and re-apply it ourselves in
|
|
12192
|
+
// tagValueProcessor for every tag except `a:t`, so non-text
|
|
12193
|
+
// values (docProps, counters, etc.) keep their old trimmed
|
|
12194
|
+
// behaviour and no whitespace-only text node is lost.
|
|
12195
|
+
trimValues: false,
|
|
12183
12196
|
// Security hardening (Load M3): explicitly disable XML entity
|
|
12184
12197
|
// processing. PPTX XML never uses DOCTYPE / DTDs, so allowing
|
|
12185
12198
|
// entity expansion serves only as an attack surface
|
|
@@ -12194,7 +12207,10 @@ var PptxRuntimeDependencyFactory = class {
|
|
|
12194
12207
|
// they cannot trigger entity expansion, so the security guarantee
|
|
12195
12208
|
// above is preserved - so text nodes hold their real characters and
|
|
12196
12209
|
// the builder re-encodes them symmetrically on save.
|
|
12197
|
-
tagValueProcessor: (
|
|
12210
|
+
tagValueProcessor: (tagName, tagValue) => {
|
|
12211
|
+
const decoded = decodeXmlEntities(tagValue);
|
|
12212
|
+
return tagName === "a:t" ? decoded : decoded.trim();
|
|
12213
|
+
}
|
|
12198
12214
|
});
|
|
12199
12215
|
}
|
|
12200
12216
|
createBuilder() {
|