@zowe/cli 8.36.0 → 8.37.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/lib/daemon/DaemonClient.d.ts.map +1 -1
- package/lib/daemon/DaemonClient.js +3 -0
- package/lib/daemon/DaemonClient.js.map +1 -1
- package/lib/zosfiles/-strings-/en.d.ts +2 -0
- package/lib/zosfiles/-strings-/en.d.ts.map +1 -1
- package/lib/zosfiles/-strings-/en.js +5 -1
- package/lib/zosfiles/-strings-/en.js.map +1 -1
- package/lib/zosfiles/ZosFiles.options.d.ts.map +1 -1
- package/lib/zosfiles/ZosFiles.options.js +3 -1
- package/lib/zosfiles/ZosFiles.options.js.map +1 -1
- package/lib/zosfiles/create/Create.utils.d.ts.map +1 -1
- package/lib/zosfiles/create/Create.utils.js +3 -1
- package/lib/zosfiles/create/Create.utils.js.map +1 -1
- package/lib/zosfiles/create/ussDir/ussDir.handler.d.ts.map +1 -1
- package/lib/zosfiles/create/ussDir/ussDir.handler.js +5 -1
- package/lib/zosfiles/create/ussDir/ussDir.handler.js.map +1 -1
- package/lib/zosfiles/create/ussFile/ussFile.handler.d.ts.map +1 -1
- package/lib/zosfiles/create/ussFile/ussFile.handler.js +5 -1
- package/lib/zosfiles/create/ussFile/ussFile.handler.js.map +1 -1
- package/lib/zosfiles/create/vsam/vsam.handler.d.ts.map +1 -1
- package/lib/zosfiles/create/vsam/vsam.handler.js +3 -1
- package/lib/zosfiles/create/vsam/vsam.handler.js.map +1 -1
- package/lib/zosfiles/create/zfs/zfs.handler.d.ts.map +1 -1
- package/lib/zosfiles/create/zfs/zfs.handler.js +3 -1
- package/lib/zosfiles/create/zfs/zfs.handler.js.map +1 -1
- package/lib/zosfiles/delete/ds/Ds.handler.d.ts.map +1 -1
- package/lib/zosfiles/delete/ds/Ds.handler.js +4 -1
- package/lib/zosfiles/delete/ds/Ds.handler.js.map +1 -1
- package/lib/zosfiles/delete/uss/Uss.handler.d.ts.map +1 -1
- package/lib/zosfiles/delete/uss/Uss.handler.js +5 -1
- package/lib/zosfiles/delete/uss/Uss.handler.js.map +1 -1
- package/lib/zosfiles/delete/vsam/Vsam.handler.d.ts.map +1 -1
- package/lib/zosfiles/delete/vsam/Vsam.handler.js +3 -1
- package/lib/zosfiles/delete/vsam/Vsam.handler.js.map +1 -1
- package/lib/zosfiles/delete/zfs/zfs.handler.d.ts.map +1 -1
- package/lib/zosfiles/delete/zfs/zfs.handler.js +3 -1
- package/lib/zosfiles/delete/zfs/zfs.handler.js.map +1 -1
- package/lib/zosfiles/download/am/AllMembers.handler.d.ts.map +1 -1
- package/lib/zosfiles/download/am/AllMembers.handler.js +3 -1
- package/lib/zosfiles/download/am/AllMembers.handler.js.map +1 -1
- package/lib/zosfiles/download/amm/AllMembersMatching.handler.d.ts.map +1 -1
- package/lib/zosfiles/download/amm/AllMembersMatching.handler.js +2 -0
- package/lib/zosfiles/download/amm/AllMembersMatching.handler.js.map +1 -1
- package/lib/zosfiles/download/ds/Dataset.handler.d.ts.map +1 -1
- package/lib/zosfiles/download/ds/Dataset.handler.js +3 -1
- package/lib/zosfiles/download/ds/Dataset.handler.js.map +1 -1
- package/lib/zosfiles/download/dsm/DataSetMatching.handler.d.ts.map +1 -1
- package/lib/zosfiles/download/dsm/DataSetMatching.handler.js +6 -2
- package/lib/zosfiles/download/dsm/DataSetMatching.handler.js.map +1 -1
- package/lib/zosfiles/download/uss/UssFile.handler.d.ts.map +1 -1
- package/lib/zosfiles/download/uss/UssFile.handler.js +2 -0
- package/lib/zosfiles/download/uss/UssFile.handler.js.map +1 -1
- package/lib/zosfiles/download/ussdir/UssDir.handler.d.ts.map +1 -1
- package/lib/zosfiles/download/ussdir/UssDir.handler.js +6 -2
- package/lib/zosfiles/download/ussdir/UssDir.handler.js.map +1 -1
- package/lib/zosfiles/edit/Edit.utils.d.ts +2 -2
- package/lib/zosfiles/edit/Edit.utils.d.ts.map +1 -1
- package/lib/zosfiles/edit/Edit.utils.js +10 -10
- package/lib/zosfiles/edit/Edit.utils.js.map +1 -1
- package/lib/zosfiles/invoke/amsFile/AmsFile.handler.d.ts.map +1 -1
- package/lib/zosfiles/invoke/amsFile/AmsFile.handler.js +5 -1
- package/lib/zosfiles/invoke/amsFile/AmsFile.handler.js.map +1 -1
- package/lib/zosfiles/invoke/amsStatements/AmsStatements.handler.d.ts.map +1 -1
- package/lib/zosfiles/invoke/amsStatements/AmsStatements.handler.js +5 -1
- package/lib/zosfiles/invoke/amsStatements/AmsStatements.handler.js.map +1 -1
- package/lib/zosfiles/list/alias/Alias.handler.d.ts.map +1 -1
- package/lib/zosfiles/list/alias/Alias.handler.js +3 -1
- package/lib/zosfiles/list/alias/Alias.handler.js.map +1 -1
- package/lib/zosfiles/list/am/AllMembers.handler.d.ts.map +1 -1
- package/lib/zosfiles/list/am/AllMembers.handler.js +3 -1
- package/lib/zosfiles/list/am/AllMembers.handler.js.map +1 -1
- package/lib/zosfiles/list/ds/DataSet.handler.d.ts.map +1 -1
- package/lib/zosfiles/list/ds/DataSet.handler.js +3 -1
- package/lib/zosfiles/list/ds/DataSet.handler.js.map +1 -1
- package/lib/zosfiles/list/fs/Fs.handler.d.ts.map +1 -1
- package/lib/zosfiles/list/fs/Fs.handler.js +6 -2
- package/lib/zosfiles/list/fs/Fs.handler.js.map +1 -1
- package/lib/zosfiles/list/uss/UssFile.handler.d.ts.map +1 -1
- package/lib/zosfiles/list/uss/UssFile.handler.js +3 -1
- package/lib/zosfiles/list/uss/UssFile.handler.js.map +1 -1
- package/lib/zosfiles/mount/fs/fs.handler.d.ts.map +1 -1
- package/lib/zosfiles/mount/fs/fs.handler.js +3 -1
- package/lib/zosfiles/mount/fs/fs.handler.js.map +1 -1
- package/lib/zosfiles/rename/ds/Ds.handler.d.ts.map +1 -1
- package/lib/zosfiles/rename/ds/Ds.handler.js +4 -1
- package/lib/zosfiles/rename/ds/Ds.handler.js.map +1 -1
- package/lib/zosfiles/rename/dsm/Dsm.handler.d.ts.map +1 -1
- package/lib/zosfiles/rename/dsm/Dsm.handler.js +4 -1
- package/lib/zosfiles/rename/dsm/Dsm.handler.js.map +1 -1
- package/lib/zosfiles/search/ds/DataSets.handler.d.ts.map +1 -1
- package/lib/zosfiles/search/ds/DataSets.handler.js +10 -2
- package/lib/zosfiles/search/ds/DataSets.handler.js.map +1 -1
- package/lib/zosfiles/upload/dtp/DirToPds.handler.d.ts.map +1 -1
- package/lib/zosfiles/upload/dtp/DirToPds.handler.js +3 -1
- package/lib/zosfiles/upload/dtp/DirToPds.handler.js.map +1 -1
- package/lib/zosfiles/upload/dtu/DirToUSSDir.handler.d.ts.map +1 -1
- package/lib/zosfiles/upload/dtu/DirToUSSDir.handler.js +3 -1
- package/lib/zosfiles/upload/dtu/DirToUSSDir.handler.js.map +1 -1
- package/lib/zosfiles/upload/ftds/FileToDataSet.handler.d.ts.map +1 -1
- package/lib/zosfiles/upload/ftds/FileToDataSet.handler.js +3 -1
- package/lib/zosfiles/upload/ftds/FileToDataSet.handler.js.map +1 -1
- package/lib/zosfiles/upload/ftu/FileToUSS.handler.d.ts.map +1 -1
- package/lib/zosfiles/upload/ftu/FileToUSS.handler.js +3 -1
- package/lib/zosfiles/upload/ftu/FileToUSS.handler.js.map +1 -1
- package/lib/zosfiles/upload/stds/StdinToDataSet.handler.d.ts.map +1 -1
- package/lib/zosfiles/upload/stds/StdinToDataSet.handler.js +3 -1
- package/lib/zosfiles/upload/stds/StdinToDataSet.handler.js.map +1 -1
- package/lib/zosfiles/view/ds/Dataset.handler.d.ts.map +1 -1
- package/lib/zosfiles/view/ds/Dataset.handler.js +3 -1
- package/lib/zosfiles/view/ds/Dataset.handler.js.map +1 -1
- package/lib/zosfiles/view/uss/USSFile.handler.d.ts.map +1 -1
- package/lib/zosfiles/view/uss/USSFile.handler.js +3 -1
- package/lib/zosfiles/view/uss/USSFile.handler.js.map +1 -1
- package/node_modules/@zowe/core-for-zowe-sdk/lib/rest/ZosmfHeaders.d.ts +14 -0
- package/node_modules/@zowe/core-for-zowe-sdk/lib/rest/ZosmfHeaders.d.ts.map +1 -1
- package/node_modules/@zowe/core-for-zowe-sdk/lib/rest/ZosmfHeaders.js +14 -0
- package/node_modules/@zowe/core-for-zowe-sdk/lib/rest/ZosmfHeaders.js.map +1 -1
- package/node_modules/@zowe/core-for-zowe-sdk/package.json +3 -3
- package/node_modules/@zowe/imperative/lib/config/src/ConfigSchema.d.ts.map +1 -1
- package/node_modules/@zowe/imperative/lib/config/src/ConfigSchema.js +1 -0
- package/node_modules/@zowe/imperative/lib/config/src/ConfigSchema.js.map +1 -1
- package/node_modules/@zowe/imperative/lib/logger/src/LoggerConfigBuilder.d.ts +1 -0
- package/node_modules/@zowe/imperative/lib/logger/src/LoggerConfigBuilder.d.ts.map +1 -1
- package/node_modules/@zowe/imperative/lib/logger/src/LoggerConfigBuilder.js +2 -0
- package/node_modules/@zowe/imperative/lib/logger/src/LoggerConfigBuilder.js.map +1 -1
- package/node_modules/@zowe/imperative/lib/logger/src/log4jsToWinston.d.ts +1 -0
- package/node_modules/@zowe/imperative/lib/logger/src/log4jsToWinston.d.ts.map +1 -1
- package/node_modules/@zowe/imperative/lib/logger/src/log4jsToWinston.js +11 -3
- package/node_modules/@zowe/imperative/lib/logger/src/log4jsToWinston.js.map +1 -1
- package/node_modules/@zowe/imperative/lib/utilities/src/TextUtils.d.ts.map +1 -1
- package/node_modules/@zowe/imperative/lib/utilities/src/TextUtils.js +25 -0
- package/node_modules/@zowe/imperative/lib/utilities/src/TextUtils.js.map +1 -1
- package/node_modules/@zowe/imperative/package.json +3 -3
- package/node_modules/@zowe/imperative/web-help/package-lock.json +62 -62
- package/node_modules/@zowe/provisioning-for-zowe-sdk/package.json +4 -4
- package/node_modules/@zowe/secrets-for-zowe-sdk/README.md +70 -0
- package/node_modules/@zowe/secrets-for-zowe-sdk/package.json +1 -1
- package/node_modules/@zowe/secrets-for-zowe-sdk/prebuilds/keyring.darwin-arm64.node +0 -0
- package/node_modules/@zowe/secrets-for-zowe-sdk/prebuilds/keyring.darwin-x64.node +0 -0
- package/node_modules/@zowe/secrets-for-zowe-sdk/prebuilds/keyring.linux-arm-gnueabihf.node +0 -0
- package/node_modules/@zowe/secrets-for-zowe-sdk/prebuilds/keyring.linux-arm64-gnu.node +0 -0
- package/node_modules/@zowe/secrets-for-zowe-sdk/prebuilds/keyring.linux-ia32-gnu.node +0 -0
- package/node_modules/@zowe/secrets-for-zowe-sdk/prebuilds/keyring.linux-x64-gnu.node +0 -0
- package/node_modules/@zowe/secrets-for-zowe-sdk/prebuilds/keyring.win32-arm64-msvc.node +0 -0
- package/node_modules/@zowe/secrets-for-zowe-sdk/prebuilds/keyring.win32-ia32-msvc.node +0 -0
- package/node_modules/@zowe/secrets-for-zowe-sdk/prebuilds/keyring.win32-x64-msvc.node +0 -0
- package/node_modules/@zowe/zos-console-for-zowe-sdk/package.json +4 -4
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/doc/IZosFilesOptions.d.ts +12 -0
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/doc/IZosFilesOptions.d.ts.map +1 -1
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/copy/Copy.js +1 -1
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/copy/Copy.js.map +1 -1
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/create/Create.d.ts.map +1 -1
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/create/Create.js +18 -3
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/create/Create.js.map +1 -1
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/delete/Delete.d.ts.map +1 -1
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/delete/Delete.js +7 -3
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/delete/Delete.js.map +1 -1
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/download/Download.js +1 -1
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/download/Download.js.map +1 -1
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/invoke/Invoke.d.ts.map +1 -1
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/invoke/Invoke.js +2 -1
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/invoke/Invoke.js.map +1 -1
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/list/List.d.ts.map +1 -1
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/list/List.js +6 -5
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/list/List.js.map +1 -1
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/mount/Mount.d.ts.map +1 -1
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/mount/Mount.js +6 -0
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/mount/Mount.js.map +1 -1
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/rename/Rename.d.ts.map +1 -1
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/rename/Rename.js +2 -1
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/rename/Rename.js.map +1 -1
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/unmount/Unmount.d.ts.map +1 -1
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/unmount/Unmount.js +3 -1
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/unmount/Unmount.js.map +1 -1
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/upload/Upload.d.ts.map +1 -1
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/upload/Upload.js +5 -5
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/upload/Upload.js.map +1 -1
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/utilities/Utilities.d.ts +4 -4
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/utilities/Utilities.d.ts.map +1 -1
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/utilities/Utilities.js +10 -33
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/methods/utilities/Utilities.js.map +1 -1
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/utils/ZosFilesUtils.d.ts +7 -0
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/utils/ZosFilesUtils.d.ts.map +1 -1
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/utils/ZosFilesUtils.js +16 -0
- package/node_modules/@zowe/zos-files-for-zowe-sdk/lib/utils/ZosFilesUtils.js.map +1 -1
- package/node_modules/@zowe/zos-files-for-zowe-sdk/package.json +5 -5
- package/node_modules/@zowe/zos-jobs-for-zowe-sdk/package.json +5 -5
- package/node_modules/@zowe/zos-logs-for-zowe-sdk/package.json +4 -4
- package/node_modules/@zowe/zos-tso-for-zowe-sdk/package.json +5 -5
- package/node_modules/@zowe/zos-uss-for-zowe-sdk/package.json +3 -3
- package/node_modules/@zowe/zos-workflows-for-zowe-sdk/package.json +5 -5
- package/node_modules/@zowe/zosmf-for-zowe-sdk/lib/constants/Zosmf.constants.d.ts.map +1 -1
- package/node_modules/@zowe/zosmf-for-zowe-sdk/lib/constants/Zosmf.constants.js +21 -0
- package/node_modules/@zowe/zosmf-for-zowe-sdk/lib/constants/Zosmf.constants.js.map +1 -1
- package/node_modules/@zowe/zosmf-for-zowe-sdk/lib/constants/Zosmf.profile.d.ts.map +1 -1
- package/node_modules/@zowe/zosmf-for-zowe-sdk/lib/constants/Zosmf.profile.js +8 -0
- package/node_modules/@zowe/zosmf-for-zowe-sdk/lib/constants/Zosmf.profile.js.map +1 -1
- package/node_modules/@zowe/zosmf-for-zowe-sdk/package.json +4 -4
- package/node_modules/js-yaml/dist/js-yaml.js +11 -3
- package/node_modules/js-yaml/dist/js-yaml.js.map +1 -1
- package/node_modules/js-yaml/dist/js-yaml.min.js +1 -1
- package/node_modules/js-yaml/dist/js-yaml.min.js.map +1 -1
- package/node_modules/js-yaml/dist/js-yaml.mjs +11 -3
- package/node_modules/js-yaml/dist/js-yaml.mjs.map +1 -1
- package/node_modules/js-yaml/lib/loader.js +16 -3
- package/node_modules/js-yaml/package.json +1 -1
- package/node_modules/sanitize-html/README.md +13 -0
- package/node_modules/sanitize-html/index.js +86 -12
- package/node_modules/sanitize-html/node_modules/dom-serializer/LICENSE +7 -0
- package/node_modules/{dom-serializer → sanitize-html/node_modules/dom-serializer}/README.md +14 -8
- package/node_modules/sanitize-html/node_modules/dom-serializer/dist/foreign-names.d.ts +11 -0
- package/node_modules/sanitize-html/node_modules/dom-serializer/dist/foreign-names.d.ts.map +1 -0
- package/node_modules/sanitize-html/node_modules/dom-serializer/dist/foreign-names.js +15 -0
- package/node_modules/sanitize-html/node_modules/dom-serializer/dist/foreign-names.js.map +1 -0
- package/node_modules/sanitize-html/node_modules/dom-serializer/dist/index.d.ts +72 -0
- package/node_modules/sanitize-html/node_modules/dom-serializer/dist/index.d.ts.map +1 -0
- package/node_modules/sanitize-html/node_modules/dom-serializer/dist/index.js +173 -0
- package/node_modules/sanitize-html/node_modules/dom-serializer/dist/index.js.map +1 -0
- package/node_modules/sanitize-html/node_modules/dom-serializer/package.json +69 -0
- package/node_modules/sanitize-html/node_modules/dom-serializer/src/foreign-names.ts +19 -0
- package/node_modules/sanitize-html/node_modules/dom-serializer/src/index.ts +315 -0
- package/node_modules/{domelementtype/lib → sanitize-html/node_modules/domelementtype/dist}/index.d.ts +12 -12
- package/node_modules/sanitize-html/node_modules/domelementtype/dist/index.d.ts.map +1 -0
- package/node_modules/{domelementtype/lib/esm → sanitize-html/node_modules/domelementtype/dist}/index.js +15 -6
- package/node_modules/sanitize-html/node_modules/domelementtype/package.json +59 -0
- package/node_modules/{domhandler/lib → sanitize-html/node_modules/domhandler/dist}/index.d.ts +9 -6
- package/node_modules/sanitize-html/node_modules/domhandler/dist/index.d.ts.map +1 -0
- package/node_modules/{domhandler/lib/esm → sanitize-html/node_modules/domhandler/dist}/index.js +34 -25
- package/node_modules/{domhandler/lib → sanitize-html/node_modules/domhandler/dist}/node.d.ts +34 -15
- package/node_modules/sanitize-html/node_modules/domhandler/dist/node.d.ts.map +1 -0
- package/node_modules/{domhandler/lib/esm → sanitize-html/node_modules/domhandler/dist}/node.js +81 -60
- package/node_modules/sanitize-html/node_modules/domhandler/package.json +65 -0
- package/node_modules/{domhandler → sanitize-html/node_modules/domhandler}/readme.md +1 -7
- package/node_modules/{domutils/lib → sanitize-html/node_modules/domutils/dist}/feeds.d.ts +2 -2
- package/node_modules/sanitize-html/node_modules/domutils/dist/feeds.d.ts.map +1 -0
- package/node_modules/{domutils/lib/esm → sanitize-html/node_modules/domutils/dist}/feeds.js +22 -25
- package/node_modules/sanitize-html/node_modules/domutils/dist/feeds.js.map +1 -0
- package/node_modules/{domutils/lib → sanitize-html/node_modules/domutils/dist}/helpers.d.ts +1 -1
- package/node_modules/sanitize-html/node_modules/domutils/dist/helpers.d.ts.map +1 -0
- package/node_modules/{domutils/lib/esm → sanitize-html/node_modules/domutils/dist}/helpers.js +16 -16
- package/node_modules/sanitize-html/node_modules/domutils/dist/helpers.js.map +1 -0
- package/node_modules/{domutils/lib/esm → sanitize-html/node_modules/domutils/dist}/index.d.ts +5 -7
- package/node_modules/sanitize-html/node_modules/domutils/dist/index.d.ts.map +1 -0
- package/node_modules/{domutils/lib/esm → sanitize-html/node_modules/domutils/dist}/index.js +5 -7
- package/node_modules/sanitize-html/node_modules/domutils/dist/index.js.map +1 -0
- package/node_modules/{domutils/lib/esm → sanitize-html/node_modules/domutils/dist}/legacy.d.ts +1 -1
- package/node_modules/sanitize-html/node_modules/domutils/dist/legacy.d.ts.map +1 -0
- package/node_modules/{domutils/lib/esm → sanitize-html/node_modules/domutils/dist}/legacy.js +15 -15
- package/node_modules/sanitize-html/node_modules/domutils/dist/legacy.js.map +1 -0
- package/node_modules/{domutils/lib/esm → sanitize-html/node_modules/domutils/dist}/manipulation.d.ts +9 -9
- package/node_modules/sanitize-html/node_modules/domutils/dist/manipulation.d.ts.map +1 -0
- package/node_modules/sanitize-html/node_modules/domutils/dist/manipulation.js +138 -0
- package/node_modules/sanitize-html/node_modules/domutils/dist/manipulation.js.map +1 -0
- package/node_modules/{domutils/lib → sanitize-html/node_modules/domutils/dist}/querying.d.ts +6 -16
- package/node_modules/sanitize-html/node_modules/domutils/dist/querying.d.ts.map +1 -0
- package/node_modules/{domutils/lib/esm → sanitize-html/node_modules/domutils/dist}/querying.js +13 -26
- package/node_modules/sanitize-html/node_modules/domutils/dist/querying.js.map +1 -0
- package/node_modules/{domutils/lib → sanitize-html/node_modules/domutils/dist}/stringify.d.ts +2 -2
- package/node_modules/sanitize-html/node_modules/domutils/dist/stringify.d.ts.map +1 -0
- package/node_modules/{domutils/lib/esm → sanitize-html/node_modules/domutils/dist}/stringify.js +1 -1
- package/node_modules/sanitize-html/node_modules/domutils/dist/stringify.js.map +1 -0
- package/node_modules/sanitize-html/node_modules/domutils/dist/traversal.d.ts +74 -0
- package/node_modules/sanitize-html/node_modules/domutils/dist/traversal.d.ts.map +1 -0
- package/node_modules/sanitize-html/node_modules/domutils/dist/traversal.js +105 -0
- package/node_modules/sanitize-html/node_modules/domutils/dist/traversal.js.map +1 -0
- package/node_modules/sanitize-html/node_modules/domutils/package.json +69 -0
- package/node_modules/{domutils → sanitize-html/node_modules/domutils}/readme.md +0 -6
- package/node_modules/sanitize-html/node_modules/domutils/src/__snapshots__/feeds.spec.ts.snap +103 -0
- package/node_modules/sanitize-html/node_modules/domutils/src/feeds.ts +301 -0
- package/node_modules/{domutils/lib/helpers.js → sanitize-html/node_modules/domutils/src/helpers.ts} +55 -43
- package/node_modules/{domutils/lib/index.d.ts → sanitize-html/node_modules/domutils/src/index.ts} +5 -8
- package/node_modules/sanitize-html/node_modules/domutils/src/legacy.ts +224 -0
- package/node_modules/sanitize-html/node_modules/domutils/src/manipulation.ts +156 -0
- package/node_modules/{domutils/lib/querying.js → sanitize-html/node_modules/domutils/src/querying.ts} +77 -60
- package/node_modules/sanitize-html/node_modules/domutils/src/stringify.ts +90 -0
- package/node_modules/sanitize-html/node_modules/domutils/src/traversal.ts +132 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/decode-codepoint.d.ts +28 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/decode-codepoint.d.ts.map +1 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/decode-codepoint.js +61 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/decode-codepoint.js.map +1 -0
- package/node_modules/{htmlparser2/node_modules/entities/dist/commonjs → sanitize-html/node_modules/entities/dist}/decode.d.ts +66 -44
- package/node_modules/sanitize-html/node_modules/entities/dist/decode.d.ts.map +1 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/decode.js +1132 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/decode.js.map +1 -0
- package/node_modules/{htmlparser2/node_modules/entities/dist/commonjs → sanitize-html/node_modules/entities/dist}/encode.d.ts +4 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/encode.d.ts.map +1 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/encode.js +295 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/encode.js.map +1 -0
- package/node_modules/{htmlparser2/node_modules/entities/dist/commonjs → sanitize-html/node_modules/entities/dist}/escape.d.ts +23 -9
- package/node_modules/sanitize-html/node_modules/entities/dist/escape.d.ts.map +1 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/escape.js +172 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/escape.js.map +1 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/generated/decode-data-html.d.ts +3 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/generated/decode-data-html.d.ts.map +1 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/generated/decode-data-html.js +5 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/generated/decode-data-html.js.map +1 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/generated/decode-data-xml.d.ts +3 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/generated/decode-data-xml.d.ts.map +1 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/generated/decode-data-xml.js +7 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/generated/decode-data-xml.js.map +1 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/generated/encode-html.d.ts +3 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/generated/encode-html.d.ts.map +1 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/generated/encode-html.js +3 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/generated/encode-html.js.map +1 -0
- package/node_modules/{htmlparser2/node_modules/entities/dist/commonjs → sanitize-html/node_modules/entities/dist}/index.d.ts +11 -18
- package/node_modules/sanitize-html/node_modules/entities/dist/index.d.ts.map +1 -0
- package/node_modules/{htmlparser2/node_modules/entities/dist/esm → sanitize-html/node_modules/entities/dist}/index.js +9 -29
- package/node_modules/sanitize-html/node_modules/entities/dist/index.js.map +1 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/internal/bin-trie-flags.d.ts +48 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/internal/bin-trie-flags.d.ts.map +1 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/internal/bin-trie-flags.js +49 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/internal/bin-trie-flags.js.map +1 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/internal/decode-shared.d.ts +38 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/internal/decode-shared.d.ts.map +1 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/internal/decode-shared.js +195 -0
- package/node_modules/sanitize-html/node_modules/entities/dist/internal/decode-shared.js.map +1 -0
- package/node_modules/sanitize-html/node_modules/entities/package.json +83 -0
- package/node_modules/{htmlparser2 → sanitize-html}/node_modules/entities/readme.md +4 -16
- package/node_modules/sanitize-html/node_modules/entities/src/decode-codepoint.ts +69 -0
- package/node_modules/sanitize-html/node_modules/entities/src/decode.ts +1368 -0
- package/node_modules/sanitize-html/node_modules/entities/src/encode.ts +337 -0
- package/node_modules/sanitize-html/node_modules/entities/src/escape.ts +187 -0
- package/node_modules/sanitize-html/node_modules/entities/src/generated/decode-data-html.ts +12 -0
- package/node_modules/sanitize-html/node_modules/entities/src/generated/decode-data-xml.ts +7 -0
- package/node_modules/sanitize-html/node_modules/entities/src/generated/encode-html.ts +3 -0
- package/node_modules/{htmlparser2 → sanitize-html}/node_modules/entities/src/index.ts +14 -41
- package/node_modules/sanitize-html/node_modules/entities/src/internal/bin-trie-flags.ts +47 -0
- package/node_modules/sanitize-html/node_modules/entities/src/internal/decode-shared.ts +209 -0
- package/node_modules/sanitize-html/node_modules/htmlparser2/README.md +257 -0
- package/node_modules/{htmlparser2/dist/esm → sanitize-html/node_modules/htmlparser2/dist}/Parser.d.ts +97 -38
- package/node_modules/sanitize-html/node_modules/htmlparser2/dist/Parser.d.ts.map +1 -0
- package/node_modules/sanitize-html/node_modules/htmlparser2/dist/Parser.js +644 -0
- package/node_modules/sanitize-html/node_modules/htmlparser2/dist/Parser.js.map +1 -0
- package/node_modules/{htmlparser2/dist/commonjs → sanitize-html/node_modules/htmlparser2/dist}/Tokenizer.d.ts +75 -7
- package/node_modules/sanitize-html/node_modules/htmlparser2/dist/Tokenizer.d.ts.map +1 -0
- package/node_modules/{htmlparser2/dist/esm → sanitize-html/node_modules/htmlparser2/dist}/Tokenizer.js +434 -179
- package/node_modules/sanitize-html/node_modules/htmlparser2/dist/Tokenizer.js.map +1 -0
- package/node_modules/sanitize-html/node_modules/htmlparser2/dist/WebWritableStream.d.ts +24 -0
- package/node_modules/sanitize-html/node_modules/htmlparser2/dist/WebWritableStream.d.ts.map +1 -0
- package/node_modules/sanitize-html/node_modules/htmlparser2/dist/WebWritableStream.js +44 -0
- package/node_modules/sanitize-html/node_modules/htmlparser2/dist/WebWritableStream.js.map +1 -0
- package/node_modules/{htmlparser2/dist/commonjs → sanitize-html/node_modules/htmlparser2/dist}/WritableStream.d.ts +1 -2
- package/node_modules/sanitize-html/node_modules/htmlparser2/dist/WritableStream.d.ts.map +1 -0
- package/node_modules/{htmlparser2/dist/esm → sanitize-html/node_modules/htmlparser2/dist}/WritableStream.js +3 -3
- package/node_modules/sanitize-html/node_modules/htmlparser2/dist/WritableStream.js.map +1 -0
- package/node_modules/{htmlparser2/dist/commonjs → sanitize-html/node_modules/htmlparser2/dist}/index.d.ts +6 -26
- package/node_modules/sanitize-html/node_modules/htmlparser2/dist/index.d.ts.map +1 -0
- package/node_modules/{htmlparser2/dist/esm → sanitize-html/node_modules/htmlparser2/dist}/index.js +2 -30
- package/node_modules/sanitize-html/node_modules/htmlparser2/dist/index.js.map +1 -0
- package/node_modules/sanitize-html/node_modules/htmlparser2/package.json +86 -0
- package/node_modules/{htmlparser2 → sanitize-html/node_modules/htmlparser2}/src/Parser.ts +260 -100
- package/node_modules/{htmlparser2 → sanitize-html/node_modules/htmlparser2}/src/Tokenizer.ts +438 -165
- package/node_modules/sanitize-html/node_modules/htmlparser2/src/WebWritableStream.ts +47 -0
- package/node_modules/{htmlparser2 → sanitize-html/node_modules/htmlparser2}/src/WritableStream.ts +1 -2
- package/node_modules/{htmlparser2 → sanitize-html/node_modules/htmlparser2}/src/index.ts +14 -43
- package/node_modules/sanitize-html/package.json +5 -2
- package/package.json +15 -15
- package/scripts/validateSecretsPrebuild.js +231 -0
- package/node_modules/dom-serializer/LICENSE +0 -11
- package/node_modules/dom-serializer/lib/esm/foreignNames.d.ts +0 -3
- package/node_modules/dom-serializer/lib/esm/foreignNames.d.ts.map +0 -1
- package/node_modules/dom-serializer/lib/esm/foreignNames.js +0 -100
- package/node_modules/dom-serializer/lib/esm/index.d.ts +0 -52
- package/node_modules/dom-serializer/lib/esm/index.d.ts.map +0 -1
- package/node_modules/dom-serializer/lib/esm/index.js +0 -190
- package/node_modules/dom-serializer/lib/esm/package.json +0 -1
- package/node_modules/dom-serializer/lib/foreignNames.d.ts +0 -3
- package/node_modules/dom-serializer/lib/foreignNames.d.ts.map +0 -1
- package/node_modules/dom-serializer/lib/foreignNames.js +0 -103
- package/node_modules/dom-serializer/lib/index.d.ts +0 -52
- package/node_modules/dom-serializer/lib/index.d.ts.map +0 -1
- package/node_modules/dom-serializer/lib/index.js +0 -229
- package/node_modules/dom-serializer/package.json +0 -69
- package/node_modules/domelementtype/lib/esm/index.d.ts +0 -48
- package/node_modules/domelementtype/lib/esm/index.d.ts.map +0 -1
- package/node_modules/domelementtype/lib/esm/package.json +0 -1
- package/node_modules/domelementtype/lib/index.d.ts.map +0 -1
- package/node_modules/domelementtype/lib/index.js +0 -55
- package/node_modules/domelementtype/package.json +0 -54
- package/node_modules/domhandler/lib/esm/index.d.ts +0 -76
- package/node_modules/domhandler/lib/esm/index.d.ts.map +0 -1
- package/node_modules/domhandler/lib/esm/node.d.ts +0 -245
- package/node_modules/domhandler/lib/esm/node.d.ts.map +0 -1
- package/node_modules/domhandler/lib/esm/package.json +0 -1
- package/node_modules/domhandler/lib/index.d.ts.map +0 -1
- package/node_modules/domhandler/lib/index.js +0 -165
- package/node_modules/domhandler/lib/node.d.ts.map +0 -1
- package/node_modules/domhandler/lib/node.js +0 -474
- package/node_modules/domhandler/package.json +0 -73
- package/node_modules/domutils/lib/esm/feeds.d.ts +0 -71
- package/node_modules/domutils/lib/esm/feeds.d.ts.map +0 -1
- package/node_modules/domutils/lib/esm/feeds.js.map +0 -1
- package/node_modules/domutils/lib/esm/helpers.d.ts +0 -59
- package/node_modules/domutils/lib/esm/helpers.d.ts.map +0 -1
- package/node_modules/domutils/lib/esm/helpers.js.map +0 -1
- package/node_modules/domutils/lib/esm/index.d.ts.map +0 -1
- package/node_modules/domutils/lib/esm/index.js.map +0 -1
- package/node_modules/domutils/lib/esm/legacy.d.ts.map +0 -1
- package/node_modules/domutils/lib/esm/legacy.js.map +0 -1
- package/node_modules/domutils/lib/esm/manipulation.d.ts.map +0 -1
- package/node_modules/domutils/lib/esm/manipulation.js +0 -134
- package/node_modules/domutils/lib/esm/manipulation.js.map +0 -1
- package/node_modules/domutils/lib/esm/package.json +0 -1
- package/node_modules/domutils/lib/esm/querying.d.ts +0 -64
- package/node_modules/domutils/lib/esm/querying.d.ts.map +0 -1
- package/node_modules/domutils/lib/esm/querying.js.map +0 -1
- package/node_modules/domutils/lib/esm/stringify.d.ts +0 -46
- package/node_modules/domutils/lib/esm/stringify.d.ts.map +0 -1
- package/node_modules/domutils/lib/esm/stringify.js.map +0 -1
- package/node_modules/domutils/lib/esm/traversal.d.ts +0 -67
- package/node_modules/domutils/lib/esm/traversal.d.ts.map +0 -1
- package/node_modules/domutils/lib/esm/traversal.js +0 -112
- package/node_modules/domutils/lib/esm/traversal.js.map +0 -1
- package/node_modules/domutils/lib/feeds.d.ts.map +0 -1
- package/node_modules/domutils/lib/feeds.js +0 -190
- package/node_modules/domutils/lib/feeds.js.map +0 -1
- package/node_modules/domutils/lib/helpers.d.ts.map +0 -1
- package/node_modules/domutils/lib/helpers.js.map +0 -1
- package/node_modules/domutils/lib/index.d.ts.map +0 -1
- package/node_modules/domutils/lib/index.js +0 -33
- package/node_modules/domutils/lib/index.js.map +0 -1
- package/node_modules/domutils/lib/legacy.d.ts +0 -79
- package/node_modules/domutils/lib/legacy.d.ts.map +0 -1
- package/node_modules/domutils/lib/legacy.js +0 -168
- package/node_modules/domutils/lib/legacy.js.map +0 -1
- package/node_modules/domutils/lib/manipulation.d.ts +0 -49
- package/node_modules/domutils/lib/manipulation.d.ts.map +0 -1
- package/node_modules/domutils/lib/manipulation.js +0 -142
- package/node_modules/domutils/lib/manipulation.js.map +0 -1
- package/node_modules/domutils/lib/querying.d.ts.map +0 -1
- package/node_modules/domutils/lib/querying.js.map +0 -1
- package/node_modules/domutils/lib/stringify.d.ts.map +0 -1
- package/node_modules/domutils/lib/stringify.js +0 -91
- package/node_modules/domutils/lib/stringify.js.map +0 -1
- package/node_modules/domutils/lib/traversal.d.ts +0 -67
- package/node_modules/domutils/lib/traversal.d.ts.map +0 -1
- package/node_modules/domutils/lib/traversal.js +0 -125
- package/node_modules/domutils/lib/traversal.js.map +0 -1
- package/node_modules/domutils/package.json +0 -79
- package/node_modules/htmlparser2/README.md +0 -171
- package/node_modules/htmlparser2/WritableStream.js +0 -3
- package/node_modules/htmlparser2/dist/commonjs/Parser.d.ts +0 -198
- package/node_modules/htmlparser2/dist/commonjs/Parser.d.ts.map +0 -1
- package/node_modules/htmlparser2/dist/commonjs/Parser.js +0 -527
- package/node_modules/htmlparser2/dist/commonjs/Parser.js.map +0 -1
- package/node_modules/htmlparser2/dist/commonjs/Tokenizer.d.ts.map +0 -1
- package/node_modules/htmlparser2/dist/commonjs/Tokenizer.js +0 -805
- package/node_modules/htmlparser2/dist/commonjs/Tokenizer.js.map +0 -1
- package/node_modules/htmlparser2/dist/commonjs/WritableStream.d.ts.map +0 -1
- package/node_modules/htmlparser2/dist/commonjs/WritableStream.js +0 -36
- package/node_modules/htmlparser2/dist/commonjs/WritableStream.js.map +0 -1
- package/node_modules/htmlparser2/dist/commonjs/index.d.ts.map +0 -1
- package/node_modules/htmlparser2/dist/commonjs/index.js +0 -123
- package/node_modules/htmlparser2/dist/commonjs/index.js.map +0 -1
- package/node_modules/htmlparser2/dist/commonjs/package.json +0 -3
- package/node_modules/htmlparser2/dist/esm/Parser.d.ts.map +0 -1
- package/node_modules/htmlparser2/dist/esm/Parser.js +0 -490
- package/node_modules/htmlparser2/dist/esm/Parser.js.map +0 -1
- package/node_modules/htmlparser2/dist/esm/Tokenizer.d.ts +0 -126
- package/node_modules/htmlparser2/dist/esm/Tokenizer.d.ts.map +0 -1
- package/node_modules/htmlparser2/dist/esm/Tokenizer.js.map +0 -1
- package/node_modules/htmlparser2/dist/esm/WritableStream.d.ts +0 -15
- package/node_modules/htmlparser2/dist/esm/WritableStream.d.ts.map +0 -1
- package/node_modules/htmlparser2/dist/esm/WritableStream.js.map +0 -1
- package/node_modules/htmlparser2/dist/esm/index.d.ts +0 -54
- package/node_modules/htmlparser2/dist/esm/index.d.ts.map +0 -1
- package/node_modules/htmlparser2/dist/esm/index.js.map +0 -1
- package/node_modules/htmlparser2/dist/esm/package.json +0 -3
- package/node_modules/htmlparser2/node_modules/entities/decode.d.ts +0 -3
- package/node_modules/htmlparser2/node_modules/entities/decode.js +0 -3
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode-codepoint.d.ts +0 -19
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode-codepoint.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode-codepoint.js +0 -77
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode-codepoint.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode.js +0 -568
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/decode.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/encode.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/encode.js +0 -92
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/encode.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/escape.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/escape.js +0 -138
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/escape.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-html.d.ts +0 -2
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-html.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-html.js +0 -7
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-html.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-xml.d.ts +0 -2
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-xml.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-xml.js +0 -7
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/decode-data-xml.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/encode-html.d.ts +0 -3
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/encode-html.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/encode-html.js +0 -14
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/generated/encode-html.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/index.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/index.js +0 -131
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/index.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/bin-trie-flags.d.ts +0 -17
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/bin-trie-flags.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/bin-trie-flags.js +0 -21
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/bin-trie-flags.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/decode-shared.d.ts +0 -2
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/decode-shared.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/decode-shared.js +0 -31
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/decode-shared.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/encode-shared.d.ts +0 -32
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/encode-shared.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/encode-shared.js +0 -94
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/internal/encode-shared.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/commonjs/package.json +0 -3
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/decode-codepoint.d.ts +0 -19
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/decode-codepoint.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/decode-codepoint.js +0 -72
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/decode-codepoint.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/decode.d.ts +0 -205
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/decode.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/decode.js +0 -554
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/decode.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/encode.d.ts +0 -22
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/encode.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/encode.js +0 -88
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/encode.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/escape.d.ts +0 -46
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/escape.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/escape.js +0 -134
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/escape.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/decode-data-html.d.ts +0 -2
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/decode-data-html.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/decode-data-html.js +0 -4
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/decode-data-html.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/decode-data-xml.d.ts +0 -2
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/decode-data-xml.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/decode-data-xml.js +0 -4
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/decode-data-xml.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/encode-html.d.ts +0 -3
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/encode-html.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/encode-html.js +0 -11
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/generated/encode-html.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/index.d.ts +0 -96
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/index.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/index.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/bin-trie-flags.d.ts +0 -17
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/bin-trie-flags.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/bin-trie-flags.js +0 -18
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/bin-trie-flags.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/decode-shared.d.ts +0 -2
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/decode-shared.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/decode-shared.js +0 -28
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/decode-shared.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/encode-shared.d.ts +0 -32
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/encode-shared.d.ts.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/encode-shared.js +0 -91
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/internal/encode-shared.js.map +0 -1
- package/node_modules/htmlparser2/node_modules/entities/dist/esm/package.json +0 -3
- package/node_modules/htmlparser2/node_modules/entities/escape.d.ts +0 -3
- package/node_modules/htmlparser2/node_modules/entities/escape.js +0 -3
- package/node_modules/htmlparser2/node_modules/entities/package.json +0 -120
- package/node_modules/htmlparser2/node_modules/entities/src/decode-codepoint.ts +0 -81
- package/node_modules/htmlparser2/node_modules/entities/src/decode.ts +0 -685
- package/node_modules/htmlparser2/node_modules/entities/src/encode.ts +0 -93
- package/node_modules/htmlparser2/node_modules/entities/src/escape.ts +0 -161
- package/node_modules/htmlparser2/node_modules/entities/src/generated/.eslintrc.json +0 -10
- package/node_modules/htmlparser2/node_modules/entities/src/generated/decode-data-html.ts +0 -6
- package/node_modules/htmlparser2/node_modules/entities/src/generated/decode-data-xml.ts +0 -6
- package/node_modules/htmlparser2/node_modules/entities/src/generated/encode-html.ts +0 -17
- package/node_modules/htmlparser2/node_modules/entities/src/internal/bin-trie-flags.ts +0 -16
- package/node_modules/htmlparser2/node_modules/entities/src/internal/decode-shared.ts +0 -30
- package/node_modules/htmlparser2/node_modules/entities/src/internal/encode-shared.ts +0 -121
- package/node_modules/htmlparser2/package.json +0 -113
- /package/node_modules/{domelementtype → sanitize-html/node_modules/domelementtype}/LICENSE +0 -0
- /package/node_modules/{domelementtype → sanitize-html/node_modules/domelementtype}/readme.md +0 -0
- /package/node_modules/{domhandler → sanitize-html/node_modules/domhandler}/LICENSE +0 -0
- /package/node_modules/{domutils → sanitize-html/node_modules/domutils}/LICENSE +0 -0
- /package/node_modules/{htmlparser2 → sanitize-html}/node_modules/entities/LICENSE +0 -0
- /package/node_modules/{htmlparser2 → sanitize-html/node_modules/htmlparser2}/LICENSE +0 -0
package/node_modules/{htmlparser2 → sanitize-html/node_modules/htmlparser2}/src/Tokenizer.ts
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
|
-
EntityDecoder,
|
|
3
2
|
DecodingMode,
|
|
3
|
+
EntityDecoder,
|
|
4
4
|
htmlDecodeTree,
|
|
5
5
|
xmlDecodeTree,
|
|
6
6
|
} from "entities/decode";
|
|
@@ -64,14 +64,14 @@ const enum State {
|
|
|
64
64
|
// Comments & CDATA
|
|
65
65
|
BeforeComment,
|
|
66
66
|
CDATASequence,
|
|
67
|
+
DeclarationSequence,
|
|
67
68
|
InSpecialComment,
|
|
68
69
|
InCommentLike,
|
|
69
70
|
|
|
70
71
|
// Special tags
|
|
71
|
-
BeforeSpecialS, // Decide if we deal with `<script` or `<style`
|
|
72
|
-
BeforeSpecialT, // Decide if we deal with `<title` or `<textarea`
|
|
73
72
|
SpecialStartSequence,
|
|
74
73
|
InSpecialTag,
|
|
74
|
+
InPlainText,
|
|
75
75
|
|
|
76
76
|
InEntity,
|
|
77
77
|
}
|
|
@@ -97,6 +97,9 @@ function isASCIIAlpha(c: number): boolean {
|
|
|
97
97
|
);
|
|
98
98
|
}
|
|
99
99
|
|
|
100
|
+
/**
|
|
101
|
+
* Quote style used for parsed attributes.
|
|
102
|
+
*/
|
|
100
103
|
export enum QuoteType {
|
|
101
104
|
NoValue = 0,
|
|
102
105
|
Unquoted = 1,
|
|
@@ -104,6 +107,9 @@ export enum QuoteType {
|
|
|
104
107
|
Double = 3,
|
|
105
108
|
}
|
|
106
109
|
|
|
110
|
+
/**
|
|
111
|
+
* Low-level tokenizer callback interface.
|
|
112
|
+
*/
|
|
107
113
|
export interface Callbacks {
|
|
108
114
|
onattribdata(start: number, endIndex: number): void;
|
|
109
115
|
onattribentity(codepoint: number): void;
|
|
@@ -120,6 +126,7 @@ export interface Callbacks {
|
|
|
120
126
|
onselfclosingtag(endIndex: number): void;
|
|
121
127
|
ontext(start: number, endIndex: number): void;
|
|
122
128
|
ontextentity(codepoint: number, endIndex: number): void;
|
|
129
|
+
isInForeignContext?(): boolean;
|
|
123
130
|
}
|
|
124
131
|
|
|
125
132
|
/**
|
|
@@ -129,9 +136,21 @@ export interface Callbacks {
|
|
|
129
136
|
* sequences with an increased offset.
|
|
130
137
|
*/
|
|
131
138
|
const Sequences = {
|
|
139
|
+
Empty: new Uint8Array(0),
|
|
132
140
|
Cdata: new Uint8Array([0x43, 0x44, 0x41, 0x54, 0x41, 0x5b]), // CDATA[
|
|
133
141
|
CdataEnd: new Uint8Array([0x5d, 0x5d, 0x3e]), // ]]>
|
|
134
|
-
CommentEnd: new Uint8Array([0x2d, 0x2d, 0x3e]), //
|
|
142
|
+
CommentEnd: new Uint8Array([0x2d, 0x2d, 0x21, 0x3e]), // `--!>`
|
|
143
|
+
Doctype: new Uint8Array([0x64, 0x6f, 0x63, 0x74, 0x79, 0x70, 0x65]), // `doctype`
|
|
144
|
+
IframeEnd: new Uint8Array([0x3c, 0x2f, 0x69, 0x66, 0x72, 0x61, 0x6d, 0x65]), // `</iframe`
|
|
145
|
+
NoembedEnd: new Uint8Array([
|
|
146
|
+
0x3c, 0x2f, 0x6e, 0x6f, 0x65, 0x6d, 0x62, 0x65, 0x64,
|
|
147
|
+
]), // `</noembed`
|
|
148
|
+
NoframesEnd: new Uint8Array([
|
|
149
|
+
0x3c, 0x2f, 0x6e, 0x6f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73,
|
|
150
|
+
]), // `</noframes`
|
|
151
|
+
Plaintext: new Uint8Array([
|
|
152
|
+
0x3c, 0x2f, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x78, 0x74,
|
|
153
|
+
]), // `</plaintext`
|
|
135
154
|
ScriptEnd: new Uint8Array([0x3c, 0x2f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74]), // `</script`
|
|
136
155
|
StyleEnd: new Uint8Array([0x3c, 0x2f, 0x73, 0x74, 0x79, 0x6c, 0x65]), // `</style`
|
|
137
156
|
TitleEnd: new Uint8Array([0x3c, 0x2f, 0x74, 0x69, 0x74, 0x6c, 0x65]), // `</title`
|
|
@@ -141,6 +160,24 @@ const Sequences = {
|
|
|
141
160
|
XmpEnd: new Uint8Array([0x3c, 0x2f, 0x78, 0x6d, 0x70]), // `</xmp`
|
|
142
161
|
};
|
|
143
162
|
|
|
163
|
+
/**
|
|
164
|
+
* Maps the first lowercase character of an HTML tag name to the sequence
|
|
165
|
+
* used for special-tag detection. All sequences share a common layout
|
|
166
|
+
* where index 2 is the first tag-name character, so matching always
|
|
167
|
+
* continues from offset 3.
|
|
168
|
+
*/
|
|
169
|
+
const specialStartSequences = new Map<number, Uint8Array>([
|
|
170
|
+
[Sequences.IframeEnd[2], Sequences.IframeEnd],
|
|
171
|
+
[Sequences.NoembedEnd[2], Sequences.NoembedEnd],
|
|
172
|
+
[Sequences.Plaintext[2], Sequences.Plaintext],
|
|
173
|
+
[Sequences.ScriptEnd[2], Sequences.ScriptEnd],
|
|
174
|
+
[Sequences.TitleEnd[2], Sequences.TitleEnd],
|
|
175
|
+
[Sequences.XmpEnd[2], Sequences.XmpEnd],
|
|
176
|
+
]);
|
|
177
|
+
|
|
178
|
+
/**
|
|
179
|
+
* Tokenizer implementation used by `Parser`.
|
|
180
|
+
*/
|
|
144
181
|
export default class Tokenizer {
|
|
145
182
|
/** The current state the tokenizer is in. */
|
|
146
183
|
private state = State.Text;
|
|
@@ -157,55 +194,64 @@ export default class Tokenizer {
|
|
|
157
194
|
/** For special parsing behavior inside of script and style tags. */
|
|
158
195
|
private isSpecial = false;
|
|
159
196
|
/** Indicates whether the tokenizer has been paused. */
|
|
160
|
-
|
|
197
|
+
running = true;
|
|
161
198
|
/** The offset of the current buffer. */
|
|
162
199
|
private offset = 0;
|
|
163
200
|
|
|
164
201
|
private readonly xmlMode: boolean;
|
|
165
202
|
private readonly decodeEntities: boolean;
|
|
203
|
+
private readonly recognizeSelfClosing: boolean;
|
|
166
204
|
private readonly entityDecoder: EntityDecoder;
|
|
167
205
|
|
|
168
206
|
constructor(
|
|
169
207
|
{
|
|
170
208
|
xmlMode = false,
|
|
171
209
|
decodeEntities = true,
|
|
172
|
-
|
|
210
|
+
recognizeSelfClosing = xmlMode,
|
|
211
|
+
}: {
|
|
212
|
+
xmlMode?: boolean;
|
|
213
|
+
decodeEntities?: boolean;
|
|
214
|
+
recognizeSelfClosing?: boolean;
|
|
215
|
+
},
|
|
173
216
|
private readonly cbs: Callbacks,
|
|
174
217
|
) {
|
|
175
218
|
this.xmlMode = xmlMode;
|
|
176
219
|
this.decodeEntities = decodeEntities;
|
|
220
|
+
this.recognizeSelfClosing = recognizeSelfClosing;
|
|
177
221
|
this.entityDecoder = new EntityDecoder(
|
|
178
222
|
xmlMode ? xmlDecodeTree : htmlDecodeTree,
|
|
179
223
|
(cp, consumed) => this.emitCodePoint(cp, consumed),
|
|
180
224
|
);
|
|
181
225
|
}
|
|
182
226
|
|
|
183
|
-
|
|
227
|
+
reset(): void {
|
|
184
228
|
this.state = State.Text;
|
|
185
229
|
this.buffer = "";
|
|
186
230
|
this.sectionStart = 0;
|
|
187
231
|
this.index = 0;
|
|
188
232
|
this.baseState = State.Text;
|
|
189
|
-
this.
|
|
233
|
+
this.isSpecial = false;
|
|
234
|
+
this.currentSequence = Sequences.Empty;
|
|
235
|
+
this.sequenceIndex = 0;
|
|
190
236
|
this.running = true;
|
|
191
237
|
this.offset = 0;
|
|
192
238
|
}
|
|
193
239
|
|
|
194
|
-
|
|
240
|
+
write(chunk: string): void {
|
|
195
241
|
this.offset += this.buffer.length;
|
|
196
242
|
this.buffer = chunk;
|
|
197
243
|
this.parse();
|
|
198
244
|
}
|
|
199
245
|
|
|
200
|
-
|
|
246
|
+
end(): void {
|
|
201
247
|
if (this.running) this.finish();
|
|
202
248
|
}
|
|
203
249
|
|
|
204
|
-
|
|
250
|
+
pause(): void {
|
|
205
251
|
this.running = false;
|
|
206
252
|
}
|
|
207
253
|
|
|
208
|
-
|
|
254
|
+
resume(): void {
|
|
209
255
|
this.running = true;
|
|
210
256
|
if (this.index < this.buffer.length + this.offset) {
|
|
211
257
|
this.parse();
|
|
@@ -227,67 +273,82 @@ export default class Tokenizer {
|
|
|
227
273
|
}
|
|
228
274
|
}
|
|
229
275
|
|
|
230
|
-
private currentSequence: Uint8Array =
|
|
276
|
+
private currentSequence: Uint8Array = Sequences.Empty;
|
|
231
277
|
private sequenceIndex = 0;
|
|
232
|
-
private stateSpecialStartSequence(c: number): void {
|
|
233
|
-
const isEnd = this.sequenceIndex === this.currentSequence.length;
|
|
234
|
-
const isMatch = isEnd
|
|
235
|
-
? // If we are at the end of the sequence, make sure the tag name has ended
|
|
236
|
-
isEndOfTagSection(c)
|
|
237
|
-
: // Otherwise, do a case-insensitive comparison
|
|
238
|
-
(c | 0x20) === this.currentSequence[this.sequenceIndex];
|
|
239
|
-
|
|
240
|
-
if (!isMatch) {
|
|
241
|
-
this.isSpecial = false;
|
|
242
|
-
} else if (!isEnd) {
|
|
243
|
-
this.sequenceIndex++;
|
|
244
|
-
return;
|
|
245
|
-
}
|
|
246
278
|
|
|
247
|
-
|
|
248
|
-
this.
|
|
249
|
-
|
|
279
|
+
private enterTagBody(): void {
|
|
280
|
+
if (this.currentSequence === Sequences.Plaintext) {
|
|
281
|
+
this.currentSequence = Sequences.Empty;
|
|
282
|
+
this.state = State.InPlainText;
|
|
283
|
+
} else if (this.isSpecial) {
|
|
284
|
+
this.state = State.InSpecialTag;
|
|
285
|
+
this.sequenceIndex = 0;
|
|
286
|
+
} else {
|
|
287
|
+
this.state = State.Text;
|
|
288
|
+
}
|
|
250
289
|
}
|
|
251
290
|
|
|
252
|
-
/**
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
}
|
|
291
|
+
/**
|
|
292
|
+
* Match the opening tag name against an HTML text-only tag sequence.
|
|
293
|
+
*
|
|
294
|
+
* Some tags share an initial prefix (`script`/`style`, `title`/`textarea`,
|
|
295
|
+
* `noembed`/`noframes`), so we may switch to an alternate sequence at the
|
|
296
|
+
* first distinguishing byte. On a successful full match we fall back to
|
|
297
|
+
* the normal tag-name state; a later `>` will enter raw-text, RCDATA, or
|
|
298
|
+
* plaintext mode based on `currentSequence` / `isSpecial`.
|
|
299
|
+
* @param c Current character code point.
|
|
300
|
+
*/
|
|
301
|
+
private stateSpecialStartSequence(c: number): void {
|
|
302
|
+
const lower = c | 0x20;
|
|
265
303
|
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
304
|
+
// Still matching — check for an alternate sequence at branch points.
|
|
305
|
+
if (this.sequenceIndex < this.currentSequence.length) {
|
|
306
|
+
if (lower === this.currentSequence[this.sequenceIndex]) {
|
|
307
|
+
this.sequenceIndex++;
|
|
308
|
+
return;
|
|
270
309
|
}
|
|
271
310
|
|
|
272
|
-
this.sequenceIndex
|
|
273
|
-
|
|
311
|
+
if (this.sequenceIndex === 3) {
|
|
312
|
+
if (
|
|
313
|
+
this.currentSequence === Sequences.ScriptEnd &&
|
|
314
|
+
lower === Sequences.StyleEnd[3]
|
|
315
|
+
) {
|
|
316
|
+
this.currentSequence = Sequences.StyleEnd;
|
|
317
|
+
this.sequenceIndex = 4;
|
|
318
|
+
return;
|
|
319
|
+
}
|
|
274
320
|
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
321
|
+
if (
|
|
322
|
+
this.currentSequence === Sequences.TitleEnd &&
|
|
323
|
+
lower === Sequences.TextareaEnd[3]
|
|
324
|
+
) {
|
|
325
|
+
this.currentSequence = Sequences.TextareaEnd;
|
|
326
|
+
this.sequenceIndex = 4;
|
|
327
|
+
return;
|
|
282
328
|
}
|
|
283
|
-
} else if (
|
|
284
|
-
|
|
285
|
-
this.
|
|
329
|
+
} else if (
|
|
330
|
+
this.sequenceIndex === 4 &&
|
|
331
|
+
this.currentSequence === Sequences.NoembedEnd &&
|
|
332
|
+
lower === Sequences.NoframesEnd[4]
|
|
333
|
+
) {
|
|
334
|
+
this.currentSequence = Sequences.NoframesEnd;
|
|
335
|
+
this.sequenceIndex = 5;
|
|
336
|
+
return;
|
|
286
337
|
}
|
|
287
|
-
} else {
|
|
288
|
-
//
|
|
289
|
-
this.sequenceIndex =
|
|
338
|
+
} else if (isEndOfTagSection(c)) {
|
|
339
|
+
// Full match on a valid tag boundary — keep the sequence.
|
|
340
|
+
this.sequenceIndex = 0;
|
|
341
|
+
this.state = State.InTagName;
|
|
342
|
+
this.stateInTagName(c);
|
|
343
|
+
return;
|
|
290
344
|
}
|
|
345
|
+
|
|
346
|
+
// No match — abandon special-tag detection.
|
|
347
|
+
this.isSpecial = false;
|
|
348
|
+
this.currentSequence = Sequences.Empty;
|
|
349
|
+
this.sequenceIndex = 0;
|
|
350
|
+
this.state = State.InTagName;
|
|
351
|
+
this.stateInTagName(c);
|
|
291
352
|
}
|
|
292
353
|
|
|
293
354
|
private stateCDATASequence(c: number): void {
|
|
@@ -300,15 +361,20 @@ export default class Tokenizer {
|
|
|
300
361
|
}
|
|
301
362
|
} else {
|
|
302
363
|
this.sequenceIndex = 0;
|
|
303
|
-
this.
|
|
304
|
-
|
|
364
|
+
if (this.xmlMode) {
|
|
365
|
+
this.state = State.InDeclaration;
|
|
366
|
+
this.stateInDeclaration(c); // Reconsume the character
|
|
367
|
+
} else {
|
|
368
|
+
this.state = State.InSpecialComment;
|
|
369
|
+
this.stateInSpecialComment(c); // Reconsume the character
|
|
370
|
+
}
|
|
305
371
|
}
|
|
306
372
|
}
|
|
307
373
|
|
|
308
374
|
/**
|
|
309
375
|
* When we wait for one specific character, we can speed things up
|
|
310
376
|
* by skipping through the buffer until we find it.
|
|
311
|
-
*
|
|
377
|
+
* @param c Current character code point.
|
|
312
378
|
* @returns Whether the character was found.
|
|
313
379
|
*/
|
|
314
380
|
private fastForwardTo(c: number): boolean {
|
|
@@ -329,6 +395,17 @@ export default class Tokenizer {
|
|
|
329
395
|
return false;
|
|
330
396
|
}
|
|
331
397
|
|
|
398
|
+
/**
|
|
399
|
+
* Emit a comment token and return to the text state.
|
|
400
|
+
* @param offset Number of characters in the end sequence that have already been matched.
|
|
401
|
+
*/
|
|
402
|
+
private emitComment(offset: number): void {
|
|
403
|
+
this.cbs.oncomment(this.sectionStart, this.index, offset);
|
|
404
|
+
this.sequenceIndex = 0;
|
|
405
|
+
this.sectionStart = this.index + 1;
|
|
406
|
+
this.state = State.Text;
|
|
407
|
+
}
|
|
408
|
+
|
|
332
409
|
/**
|
|
333
410
|
* Comments and CDATA end with `-->` and `]]>`.
|
|
334
411
|
*
|
|
@@ -336,14 +413,42 @@ export default class Tokenizer {
|
|
|
336
413
|
* - Their end sequences have a distinct character they start with.
|
|
337
414
|
* - That character is then repeated, so we have to check multiple repeats.
|
|
338
415
|
* - All characters but the start character of the sequence can be skipped.
|
|
416
|
+
* @param c Current character code point.
|
|
339
417
|
*/
|
|
340
418
|
private stateInCommentLike(c: number): void {
|
|
341
|
-
if (
|
|
419
|
+
if (
|
|
420
|
+
!this.xmlMode &&
|
|
421
|
+
this.currentSequence === Sequences.CommentEnd &&
|
|
422
|
+
this.sequenceIndex <= 1 &&
|
|
423
|
+
/*
|
|
424
|
+
* We're still at the very start of the comment: the only
|
|
425
|
+
* characters consumed since `<!--` are the dashes that
|
|
426
|
+
* advanced sequenceIndex (0 for `<!-->`, 1 for `<!--->`).
|
|
427
|
+
*/
|
|
428
|
+
this.index === this.sectionStart + this.sequenceIndex &&
|
|
429
|
+
c === CharCodes.Gt
|
|
430
|
+
) {
|
|
431
|
+
// Abruptly closed empty HTML comment.
|
|
432
|
+
this.emitComment(this.sequenceIndex);
|
|
433
|
+
} else if (
|
|
434
|
+
this.currentSequence === Sequences.CommentEnd &&
|
|
435
|
+
this.sequenceIndex === 2 &&
|
|
436
|
+
c === CharCodes.Gt
|
|
437
|
+
) {
|
|
438
|
+
// `!` is optional here, so the same sequence also accepts `-->`.
|
|
439
|
+
this.emitComment(2);
|
|
440
|
+
} else if (
|
|
441
|
+
this.currentSequence === Sequences.CommentEnd &&
|
|
442
|
+
this.sequenceIndex === this.currentSequence.length - 1 &&
|
|
443
|
+
c !== CharCodes.Gt
|
|
444
|
+
) {
|
|
445
|
+
this.sequenceIndex = Number(c === CharCodes.Dash);
|
|
446
|
+
} else if (c === this.currentSequence[this.sequenceIndex]) {
|
|
342
447
|
if (++this.sequenceIndex === this.currentSequence.length) {
|
|
343
448
|
if (this.currentSequence === Sequences.CdataEnd) {
|
|
344
449
|
this.cbs.oncdata(this.sectionStart, this.index, 2);
|
|
345
450
|
} else {
|
|
346
|
-
this.cbs.oncomment(this.sectionStart, this.index,
|
|
451
|
+
this.cbs.oncomment(this.sectionStart, this.index, 3);
|
|
347
452
|
}
|
|
348
453
|
|
|
349
454
|
this.sequenceIndex = 0;
|
|
@@ -366,16 +471,60 @@ export default class Tokenizer {
|
|
|
366
471
|
*
|
|
367
472
|
* XML allows a lot more characters here (@see https://www.w3.org/TR/REC-xml/#NT-NameStartChar).
|
|
368
473
|
* We allow anything that wouldn't end the tag.
|
|
474
|
+
* @param c Current character code point.
|
|
369
475
|
*/
|
|
370
476
|
private isTagStartChar(c: number) {
|
|
371
477
|
return this.xmlMode ? !isEndOfTagSection(c) : isASCIIAlpha(c);
|
|
372
478
|
}
|
|
373
479
|
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
480
|
+
/**
|
|
481
|
+
* Scan raw-text / RCDATA content for the matching end tag.
|
|
482
|
+
*
|
|
483
|
+
* For RCDATA tags (`<title>`, `<textarea>`) entities are decoded inline.
|
|
484
|
+
* For raw-text tags (`<script>`, `<style>`, etc.) we fast-forward to `<`.
|
|
485
|
+
* @param c Current character code point.
|
|
486
|
+
*/
|
|
487
|
+
private stateInSpecialTag(c: number): void {
|
|
488
|
+
if (this.sequenceIndex === this.currentSequence.length) {
|
|
489
|
+
if (isEndOfTagSection(c)) {
|
|
490
|
+
const endOfText = this.index - this.currentSequence.length;
|
|
491
|
+
|
|
492
|
+
if (this.sectionStart < endOfText) {
|
|
493
|
+
// Spoof the index so that reported locations match up.
|
|
494
|
+
const actualIndex = this.index;
|
|
495
|
+
this.index = endOfText;
|
|
496
|
+
this.cbs.ontext(this.sectionStart, endOfText);
|
|
497
|
+
this.index = actualIndex;
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
this.isSpecial = false;
|
|
501
|
+
this.sectionStart = endOfText + 2; // Skip over the `</`
|
|
502
|
+
this.stateInClosingTagName(c);
|
|
503
|
+
return; // We are done; skip the rest of the function.
|
|
504
|
+
}
|
|
505
|
+
|
|
506
|
+
this.sequenceIndex = 0;
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
if ((c | 0x20) === this.currentSequence[this.sequenceIndex]) {
|
|
510
|
+
this.sequenceIndex += 1;
|
|
511
|
+
} else if (this.sequenceIndex === 0) {
|
|
512
|
+
if (
|
|
513
|
+
this.currentSequence === Sequences.TitleEnd ||
|
|
514
|
+
this.currentSequence === Sequences.TextareaEnd
|
|
515
|
+
) {
|
|
516
|
+
// RCDATA tags have to parse entities while still looking for their end tag.
|
|
517
|
+
if (this.decodeEntities && c === CharCodes.Amp) {
|
|
518
|
+
this.startEntity();
|
|
519
|
+
}
|
|
520
|
+
} else if (this.fastForwardTo(CharCodes.Lt)) {
|
|
521
|
+
// Outside of RCDATA tags, we can fast-forward.
|
|
522
|
+
this.sequenceIndex = 1;
|
|
523
|
+
}
|
|
524
|
+
} else {
|
|
525
|
+
// If we see a `<`, set the sequence index to 1; useful for eg. `<</script>`.
|
|
526
|
+
this.sequenceIndex = Number(c === CharCodes.Lt);
|
|
527
|
+
}
|
|
379
528
|
}
|
|
380
529
|
|
|
381
530
|
private stateBeforeTagName(c: number): void {
|
|
@@ -383,22 +532,29 @@ export default class Tokenizer {
|
|
|
383
532
|
this.state = State.BeforeDeclaration;
|
|
384
533
|
this.sectionStart = this.index + 1;
|
|
385
534
|
} else if (c === CharCodes.Questionmark) {
|
|
386
|
-
this.
|
|
387
|
-
|
|
535
|
+
if (this.xmlMode) {
|
|
536
|
+
this.state = State.InProcessingInstruction;
|
|
537
|
+
this.sequenceIndex = 0;
|
|
538
|
+
this.sectionStart = this.index + 1;
|
|
539
|
+
} else {
|
|
540
|
+
this.state = State.InSpecialComment;
|
|
541
|
+
this.sectionStart = this.index;
|
|
542
|
+
}
|
|
388
543
|
} else if (this.isTagStartChar(c)) {
|
|
389
|
-
const lower = c | 0x20;
|
|
390
544
|
this.sectionStart = this.index;
|
|
391
|
-
|
|
545
|
+
|
|
546
|
+
const special =
|
|
547
|
+
this.xmlMode || this.cbs.isInForeignContext?.()
|
|
548
|
+
? undefined
|
|
549
|
+
: specialStartSequences.get(c | 0x20);
|
|
550
|
+
|
|
551
|
+
if (special === undefined) {
|
|
392
552
|
this.state = State.InTagName;
|
|
393
|
-
} else if (lower === Sequences.ScriptEnd[2]) {
|
|
394
|
-
this.state = State.BeforeSpecialS;
|
|
395
|
-
} else if (
|
|
396
|
-
lower === Sequences.TitleEnd[2] ||
|
|
397
|
-
lower === Sequences.XmpEnd[2]
|
|
398
|
-
) {
|
|
399
|
-
this.state = State.BeforeSpecialT;
|
|
400
553
|
} else {
|
|
401
|
-
this.
|
|
554
|
+
this.isSpecial = true;
|
|
555
|
+
this.currentSequence = special;
|
|
556
|
+
this.sequenceIndex = 3;
|
|
557
|
+
this.state = State.SpecialStartSequence;
|
|
402
558
|
}
|
|
403
559
|
} else if (c === CharCodes.Slash) {
|
|
404
560
|
this.state = State.BeforeClosingTagName;
|
|
@@ -417,9 +573,17 @@ export default class Tokenizer {
|
|
|
417
573
|
}
|
|
418
574
|
private stateBeforeClosingTagName(c: number): void {
|
|
419
575
|
if (isWhitespace(c)) {
|
|
420
|
-
|
|
576
|
+
if (this.xmlMode) {
|
|
577
|
+
// Ignore
|
|
578
|
+
} else {
|
|
579
|
+
this.state = State.InSpecialComment;
|
|
580
|
+
this.sectionStart = this.index;
|
|
581
|
+
}
|
|
421
582
|
} else if (c === CharCodes.Gt) {
|
|
422
583
|
this.state = State.Text;
|
|
584
|
+
if (!this.xmlMode) {
|
|
585
|
+
this.sectionStart = this.index + 1;
|
|
586
|
+
}
|
|
423
587
|
} else {
|
|
424
588
|
this.state = this.isTagStartChar(c)
|
|
425
589
|
? State.InClosingTagName
|
|
@@ -428,7 +592,7 @@ export default class Tokenizer {
|
|
|
428
592
|
}
|
|
429
593
|
}
|
|
430
594
|
private stateInClosingTagName(c: number): void {
|
|
431
|
-
if (
|
|
595
|
+
if (isEndOfTagSection(c)) {
|
|
432
596
|
this.cbs.onclosetag(this.sectionStart, this.index);
|
|
433
597
|
this.sectionStart = -1;
|
|
434
598
|
this.state = State.AfterClosingTagName;
|
|
@@ -445,12 +609,7 @@ export default class Tokenizer {
|
|
|
445
609
|
private stateBeforeAttributeName(c: number): void {
|
|
446
610
|
if (c === CharCodes.Gt) {
|
|
447
611
|
this.cbs.onopentagend(this.index);
|
|
448
|
-
|
|
449
|
-
this.state = State.InSpecialTag;
|
|
450
|
-
this.sequenceIndex = 0;
|
|
451
|
-
} else {
|
|
452
|
-
this.state = State.Text;
|
|
453
|
-
}
|
|
612
|
+
this.enterTagBody();
|
|
454
613
|
this.sectionStart = this.index + 1;
|
|
455
614
|
} else if (c === CharCodes.Slash) {
|
|
456
615
|
this.state = State.InSelfClosingTag;
|
|
@@ -459,12 +618,28 @@ export default class Tokenizer {
|
|
|
459
618
|
this.sectionStart = this.index;
|
|
460
619
|
}
|
|
461
620
|
}
|
|
621
|
+
/**
|
|
622
|
+
* Handle `/` before `>` in an opening tag.
|
|
623
|
+
*
|
|
624
|
+
* In HTML mode, text-only tags ignore the self-closing flag and still enter
|
|
625
|
+
* their raw-text/RCDATA/plaintext state unless self-closing tags are being
|
|
626
|
+
* recognized. In XML mode, or for ordinary tags, the tokenizer returns to
|
|
627
|
+
* regular text parsing after emitting the self-closing callback.
|
|
628
|
+
* @param c Current character code point.
|
|
629
|
+
*/
|
|
462
630
|
private stateInSelfClosingTag(c: number): void {
|
|
463
631
|
if (c === CharCodes.Gt) {
|
|
464
632
|
this.cbs.onselfclosingtag(this.index);
|
|
465
|
-
this.state = State.Text;
|
|
466
633
|
this.sectionStart = this.index + 1;
|
|
634
|
+
|
|
635
|
+
if (!this.recognizeSelfClosing) {
|
|
636
|
+
this.enterTagBody();
|
|
637
|
+
return;
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
this.state = State.Text;
|
|
467
641
|
this.isSpecial = false; // Reset special state, in case of self-closing special tags
|
|
642
|
+
this.currentSequence = Sequences.Empty;
|
|
468
643
|
} else if (!isWhitespace(c)) {
|
|
469
644
|
this.state = State.BeforeAttributeName;
|
|
470
645
|
this.stateBeforeAttributeName(c);
|
|
@@ -540,15 +715,57 @@ export default class Tokenizer {
|
|
|
540
715
|
this.startEntity();
|
|
541
716
|
}
|
|
542
717
|
}
|
|
718
|
+
/**
|
|
719
|
+
* Distinguish between CDATA, declarations, HTML comments, and HTML bogus
|
|
720
|
+
* comments after `<!`.
|
|
721
|
+
*
|
|
722
|
+
* In HTML mode, only real comments and doctypes stay on declaration paths;
|
|
723
|
+
* everything else becomes a bogus comment terminated by the next `>`.
|
|
724
|
+
* @param c Current character code point.
|
|
725
|
+
*/
|
|
543
726
|
private stateBeforeDeclaration(c: number): void {
|
|
544
727
|
if (c === CharCodes.OpeningSquareBracket) {
|
|
545
728
|
this.state = State.CDATASequence;
|
|
546
729
|
this.sequenceIndex = 0;
|
|
547
|
-
} else {
|
|
730
|
+
} else if (this.xmlMode) {
|
|
548
731
|
this.state =
|
|
549
732
|
c === CharCodes.Dash
|
|
550
733
|
? State.BeforeComment
|
|
551
734
|
: State.InDeclaration;
|
|
735
|
+
} else if ((c | 0x20) === Sequences.Doctype[0]) {
|
|
736
|
+
this.state = State.DeclarationSequence;
|
|
737
|
+
this.currentSequence = Sequences.Doctype;
|
|
738
|
+
this.sequenceIndex = 1;
|
|
739
|
+
} else if (c === CharCodes.Gt) {
|
|
740
|
+
this.cbs.oncomment(this.sectionStart, this.index, 0);
|
|
741
|
+
this.state = State.Text;
|
|
742
|
+
this.sectionStart = this.index + 1;
|
|
743
|
+
} else if (c === CharCodes.Dash) {
|
|
744
|
+
this.state = State.BeforeComment;
|
|
745
|
+
} else {
|
|
746
|
+
this.state = State.InSpecialComment;
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
/**
|
|
750
|
+
* Continue matching `doctype` after `<!d`.
|
|
751
|
+
*
|
|
752
|
+
* A full `doctype` match stays on the declaration path; any other name falls
|
|
753
|
+
* back to an HTML bogus comment, which matches browser behavior for
|
|
754
|
+
* non-doctype `<!...>` constructs.
|
|
755
|
+
* @param c Current character code point.
|
|
756
|
+
*/
|
|
757
|
+
private stateDeclarationSequence(c: number): void {
|
|
758
|
+
if (this.sequenceIndex === this.currentSequence.length) {
|
|
759
|
+
this.state = State.InDeclaration;
|
|
760
|
+
this.stateInDeclaration(c);
|
|
761
|
+
} else if ((c | 0x20) === this.currentSequence[this.sequenceIndex]) {
|
|
762
|
+
this.sequenceIndex += 1;
|
|
763
|
+
} else if (c === CharCodes.Gt) {
|
|
764
|
+
this.cbs.oncomment(this.sectionStart, this.index, 0);
|
|
765
|
+
this.state = State.Text;
|
|
766
|
+
this.sectionStart = this.index + 1;
|
|
767
|
+
} else {
|
|
768
|
+
this.state = State.InSpecialComment;
|
|
552
769
|
}
|
|
553
770
|
}
|
|
554
771
|
private stateInDeclaration(c: number): void {
|
|
@@ -558,22 +775,43 @@ export default class Tokenizer {
|
|
|
558
775
|
this.sectionStart = this.index + 1;
|
|
559
776
|
}
|
|
560
777
|
}
|
|
778
|
+
/**
|
|
779
|
+
* XML processing instructions (`<?...?>`).
|
|
780
|
+
*
|
|
781
|
+
* In HTML mode `<?` is routed to `InSpecialComment` instead, so this
|
|
782
|
+
* state is only reachable in XML mode.
|
|
783
|
+
* @param c Current character code point.
|
|
784
|
+
*/
|
|
561
785
|
private stateInProcessingInstruction(c: number): void {
|
|
562
|
-
if (c === CharCodes.
|
|
563
|
-
|
|
786
|
+
if (c === CharCodes.Questionmark) {
|
|
787
|
+
// Remember that we just consumed `?`, so the next `>` closes the PI.
|
|
788
|
+
this.sequenceIndex = 1;
|
|
789
|
+
} else if (c === CharCodes.Gt && this.sequenceIndex === 1) {
|
|
790
|
+
this.cbs.onprocessinginstruction(this.sectionStart, this.index - 1);
|
|
791
|
+
this.sequenceIndex = 0;
|
|
564
792
|
this.state = State.Text;
|
|
565
793
|
this.sectionStart = this.index + 1;
|
|
794
|
+
} else {
|
|
795
|
+
// Keep scanning for the next `?`, which can start a closing `?>`.
|
|
796
|
+
this.sequenceIndex = Number(
|
|
797
|
+
this.fastForwardTo(CharCodes.Questionmark),
|
|
798
|
+
);
|
|
566
799
|
}
|
|
567
800
|
}
|
|
568
801
|
private stateBeforeComment(c: number): void {
|
|
569
802
|
if (c === CharCodes.Dash) {
|
|
570
803
|
this.state = State.InCommentLike;
|
|
571
804
|
this.currentSequence = Sequences.CommentEnd;
|
|
572
|
-
|
|
573
|
-
this.sequenceIndex = 2;
|
|
805
|
+
this.sequenceIndex = 0;
|
|
574
806
|
this.sectionStart = this.index + 1;
|
|
575
|
-
} else {
|
|
807
|
+
} else if (this.xmlMode) {
|
|
576
808
|
this.state = State.InDeclaration;
|
|
809
|
+
} else if (c === CharCodes.Gt) {
|
|
810
|
+
this.cbs.oncomment(this.sectionStart, this.index, 0);
|
|
811
|
+
this.state = State.Text;
|
|
812
|
+
this.sectionStart = this.index + 1;
|
|
813
|
+
} else {
|
|
814
|
+
this.state = State.InSpecialComment;
|
|
577
815
|
}
|
|
578
816
|
}
|
|
579
817
|
private stateInSpecialComment(c: number): void {
|
|
@@ -583,42 +821,6 @@ export default class Tokenizer {
|
|
|
583
821
|
this.sectionStart = this.index + 1;
|
|
584
822
|
}
|
|
585
823
|
}
|
|
586
|
-
private stateBeforeSpecialS(c: number): void {
|
|
587
|
-
const lower = c | 0x20;
|
|
588
|
-
if (lower === Sequences.ScriptEnd[3]) {
|
|
589
|
-
this.startSpecial(Sequences.ScriptEnd, 4);
|
|
590
|
-
} else if (lower === Sequences.StyleEnd[3]) {
|
|
591
|
-
this.startSpecial(Sequences.StyleEnd, 4);
|
|
592
|
-
} else {
|
|
593
|
-
this.state = State.InTagName;
|
|
594
|
-
this.stateInTagName(c); // Consume the token again
|
|
595
|
-
}
|
|
596
|
-
}
|
|
597
|
-
|
|
598
|
-
private stateBeforeSpecialT(c: number): void {
|
|
599
|
-
const lower = c | 0x20;
|
|
600
|
-
switch (lower) {
|
|
601
|
-
case Sequences.TitleEnd[3]: {
|
|
602
|
-
this.startSpecial(Sequences.TitleEnd, 4);
|
|
603
|
-
|
|
604
|
-
break;
|
|
605
|
-
}
|
|
606
|
-
case Sequences.TextareaEnd[3]: {
|
|
607
|
-
this.startSpecial(Sequences.TextareaEnd, 4);
|
|
608
|
-
|
|
609
|
-
break;
|
|
610
|
-
}
|
|
611
|
-
case Sequences.XmpEnd[3]: {
|
|
612
|
-
this.startSpecial(Sequences.XmpEnd, 4);
|
|
613
|
-
|
|
614
|
-
break;
|
|
615
|
-
}
|
|
616
|
-
default: {
|
|
617
|
-
this.state = State.InTagName;
|
|
618
|
-
this.stateInTagName(c); // Consume the token again
|
|
619
|
-
}
|
|
620
|
-
}
|
|
621
|
-
}
|
|
622
824
|
|
|
623
825
|
private startEntity() {
|
|
624
826
|
this.baseState = this.state;
|
|
@@ -668,6 +870,7 @@ export default class Tokenizer {
|
|
|
668
870
|
if (this.running && this.sectionStart !== this.index) {
|
|
669
871
|
if (
|
|
670
872
|
this.state === State.Text ||
|
|
873
|
+
this.state === State.InPlainText ||
|
|
671
874
|
(this.state === State.InSpecialTag && this.sequenceIndex === 0)
|
|
672
875
|
) {
|
|
673
876
|
this.cbs.ontext(this.sectionStart, this.index);
|
|
@@ -700,6 +903,11 @@ export default class Tokenizer {
|
|
|
700
903
|
this.stateText(c);
|
|
701
904
|
break;
|
|
702
905
|
}
|
|
906
|
+
case State.InPlainText: {
|
|
907
|
+
// Skip to end of buffer; cleanup() emits the text.
|
|
908
|
+
this.index = this.buffer.length + this.offset - 1;
|
|
909
|
+
break;
|
|
910
|
+
}
|
|
703
911
|
case State.SpecialStartSequence: {
|
|
704
912
|
this.stateSpecialStartSequence(c);
|
|
705
913
|
break;
|
|
@@ -712,6 +920,10 @@ export default class Tokenizer {
|
|
|
712
920
|
this.stateCDATASequence(c);
|
|
713
921
|
break;
|
|
714
922
|
}
|
|
923
|
+
case State.DeclarationSequence: {
|
|
924
|
+
this.stateDeclarationSequence(c);
|
|
925
|
+
break;
|
|
926
|
+
}
|
|
715
927
|
case State.InAttributeValueDq: {
|
|
716
928
|
this.stateInAttributeValueDoubleQuotes(c);
|
|
717
929
|
break;
|
|
@@ -764,14 +976,6 @@ export default class Tokenizer {
|
|
|
764
976
|
this.stateAfterClosingTagName(c);
|
|
765
977
|
break;
|
|
766
978
|
}
|
|
767
|
-
case State.BeforeSpecialS: {
|
|
768
|
-
this.stateBeforeSpecialS(c);
|
|
769
|
-
break;
|
|
770
|
-
}
|
|
771
|
-
case State.BeforeSpecialT: {
|
|
772
|
-
this.stateBeforeSpecialT(c);
|
|
773
|
-
break;
|
|
774
|
-
}
|
|
775
979
|
case State.InAttributeValueNq: {
|
|
776
980
|
this.stateInAttributeValueNoQuotes(c);
|
|
777
981
|
break;
|
|
@@ -817,38 +1021,107 @@ export default class Tokenizer {
|
|
|
817
1021
|
this.cbs.onend();
|
|
818
1022
|
}
|
|
819
1023
|
|
|
1024
|
+
private handleTrailingCommentLikeData(endIndex: number): boolean {
|
|
1025
|
+
if (this.state !== State.InCommentLike) {
|
|
1026
|
+
return false;
|
|
1027
|
+
}
|
|
1028
|
+
|
|
1029
|
+
if (this.currentSequence === Sequences.CdataEnd) {
|
|
1030
|
+
if (this.xmlMode) {
|
|
1031
|
+
if (this.sectionStart < endIndex) {
|
|
1032
|
+
this.cbs.oncdata(this.sectionStart, endIndex, 0);
|
|
1033
|
+
}
|
|
1034
|
+
} else {
|
|
1035
|
+
/* In HTML mode, unclosed CDATA is a bogus comment. */
|
|
1036
|
+
const cdataStart =
|
|
1037
|
+
this.sectionStart - Sequences.Cdata.length - 1;
|
|
1038
|
+
this.cbs.oncomment(cdataStart, endIndex, 0);
|
|
1039
|
+
}
|
|
1040
|
+
} else {
|
|
1041
|
+
const offset = this.xmlMode
|
|
1042
|
+
? 0
|
|
1043
|
+
: Math.min(this.sequenceIndex, Sequences.CommentEnd.length - 1);
|
|
1044
|
+
this.cbs.oncomment(this.sectionStart, endIndex, offset);
|
|
1045
|
+
}
|
|
1046
|
+
|
|
1047
|
+
return true;
|
|
1048
|
+
}
|
|
1049
|
+
|
|
1050
|
+
private handleTrailingMarkupDeclaration(endIndex: number): boolean {
|
|
1051
|
+
if (this.xmlMode) {
|
|
1052
|
+
switch (this.state) {
|
|
1053
|
+
case State.InSpecialComment:
|
|
1054
|
+
case State.BeforeComment:
|
|
1055
|
+
case State.CDATASequence:
|
|
1056
|
+
case State.DeclarationSequence:
|
|
1057
|
+
case State.InDeclaration: {
|
|
1058
|
+
this.cbs.ontext(this.sectionStart, endIndex);
|
|
1059
|
+
return true;
|
|
1060
|
+
}
|
|
1061
|
+
default: {
|
|
1062
|
+
return false;
|
|
1063
|
+
}
|
|
1064
|
+
}
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
switch (this.state) {
|
|
1068
|
+
case State.BeforeDeclaration:
|
|
1069
|
+
case State.InSpecialComment:
|
|
1070
|
+
case State.BeforeComment:
|
|
1071
|
+
case State.CDATASequence: {
|
|
1072
|
+
this.cbs.oncomment(this.sectionStart, endIndex, 0);
|
|
1073
|
+
return true;
|
|
1074
|
+
}
|
|
1075
|
+
case State.DeclarationSequence: {
|
|
1076
|
+
if (this.sequenceIndex !== Sequences.Doctype.length) {
|
|
1077
|
+
this.cbs.oncomment(this.sectionStart, endIndex, 0);
|
|
1078
|
+
}
|
|
1079
|
+
return true;
|
|
1080
|
+
}
|
|
1081
|
+
case State.InDeclaration: {
|
|
1082
|
+
return true;
|
|
1083
|
+
}
|
|
1084
|
+
default: {
|
|
1085
|
+
return false;
|
|
1086
|
+
}
|
|
1087
|
+
}
|
|
1088
|
+
}
|
|
1089
|
+
|
|
820
1090
|
/** Handle any trailing data. */
|
|
821
1091
|
private handleTrailingData() {
|
|
822
1092
|
const endIndex = this.buffer.length + this.offset;
|
|
823
1093
|
|
|
1094
|
+
if (
|
|
1095
|
+
this.handleTrailingCommentLikeData(endIndex) ||
|
|
1096
|
+
this.handleTrailingMarkupDeclaration(endIndex)
|
|
1097
|
+
) {
|
|
1098
|
+
return;
|
|
1099
|
+
}
|
|
1100
|
+
|
|
824
1101
|
// If there is no remaining data, we are done.
|
|
825
1102
|
if (this.sectionStart >= endIndex) {
|
|
826
1103
|
return;
|
|
827
1104
|
}
|
|
828
1105
|
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
1106
|
+
switch (this.state) {
|
|
1107
|
+
case State.InTagName:
|
|
1108
|
+
case State.BeforeAttributeName:
|
|
1109
|
+
case State.BeforeAttributeValue:
|
|
1110
|
+
case State.AfterAttributeName:
|
|
1111
|
+
case State.InAttributeName:
|
|
1112
|
+
case State.InAttributeValueSq:
|
|
1113
|
+
case State.InAttributeValueDq:
|
|
1114
|
+
case State.InAttributeValueNq:
|
|
1115
|
+
case State.InClosingTagName: {
|
|
1116
|
+
/*
|
|
1117
|
+
* If we are currently in an opening or closing tag, us not calling the
|
|
1118
|
+
* respective callback signals that the tag should be ignored.
|
|
1119
|
+
*/
|
|
1120
|
+
break;
|
|
1121
|
+
}
|
|
1122
|
+
default: {
|
|
1123
|
+
this.cbs.ontext(this.sectionStart, endIndex);
|
|
834
1124
|
}
|
|
835
|
-
} else if (
|
|
836
|
-
this.state === State.InTagName ||
|
|
837
|
-
this.state === State.BeforeAttributeName ||
|
|
838
|
-
this.state === State.BeforeAttributeValue ||
|
|
839
|
-
this.state === State.AfterAttributeName ||
|
|
840
|
-
this.state === State.InAttributeName ||
|
|
841
|
-
this.state === State.InAttributeValueSq ||
|
|
842
|
-
this.state === State.InAttributeValueDq ||
|
|
843
|
-
this.state === State.InAttributeValueNq ||
|
|
844
|
-
this.state === State.InClosingTagName
|
|
845
|
-
) {
|
|
846
|
-
/*
|
|
847
|
-
* If we are currently in an opening or closing tag, us not calling the
|
|
848
|
-
* respective callback signals that the tag should be ignored.
|
|
849
|
-
*/
|
|
850
|
-
} else {
|
|
851
|
-
this.cbs.ontext(this.sectionStart, endIndex);
|
|
852
1125
|
}
|
|
853
1126
|
}
|
|
854
1127
|
|