@zowe/cli 8.36.1 → 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/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/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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { DecodingMode, EntityDecoder, htmlDecodeTree, xmlDecodeTree, } from "entities/decode";
|
|
2
2
|
var CharCodes;
|
|
3
3
|
(function (CharCodes) {
|
|
4
4
|
CharCodes[CharCodes["Tab"] = 9] = "Tab";
|
|
@@ -55,13 +55,13 @@ var State;
|
|
|
55
55
|
// Comments & CDATA
|
|
56
56
|
State[State["BeforeComment"] = 18] = "BeforeComment";
|
|
57
57
|
State[State["CDATASequence"] = 19] = "CDATASequence";
|
|
58
|
-
State[State["
|
|
59
|
-
State[State["
|
|
58
|
+
State[State["DeclarationSequence"] = 20] = "DeclarationSequence";
|
|
59
|
+
State[State["InSpecialComment"] = 21] = "InSpecialComment";
|
|
60
|
+
State[State["InCommentLike"] = 22] = "InCommentLike";
|
|
60
61
|
// Special tags
|
|
61
|
-
State[State["
|
|
62
|
-
State[State["
|
|
63
|
-
State[State["
|
|
64
|
-
State[State["InSpecialTag"] = 25] = "InSpecialTag";
|
|
62
|
+
State[State["SpecialStartSequence"] = 23] = "SpecialStartSequence";
|
|
63
|
+
State[State["InSpecialTag"] = 24] = "InSpecialTag";
|
|
64
|
+
State[State["InPlainText"] = 25] = "InPlainText";
|
|
65
65
|
State[State["InEntity"] = 26] = "InEntity";
|
|
66
66
|
})(State || (State = {}));
|
|
67
67
|
function isWhitespace(c) {
|
|
@@ -78,6 +78,9 @@ function isASCIIAlpha(c) {
|
|
|
78
78
|
return ((c >= CharCodes.LowerA && c <= CharCodes.LowerZ) ||
|
|
79
79
|
(c >= CharCodes.UpperA && c <= CharCodes.UpperZ));
|
|
80
80
|
}
|
|
81
|
+
/**
|
|
82
|
+
* Quote style used for parsed attributes.
|
|
83
|
+
*/
|
|
81
84
|
export var QuoteType;
|
|
82
85
|
(function (QuoteType) {
|
|
83
86
|
QuoteType[QuoteType["NoValue"] = 0] = "NoValue";
|
|
@@ -92,9 +95,21 @@ export var QuoteType;
|
|
|
92
95
|
* sequences with an increased offset.
|
|
93
96
|
*/
|
|
94
97
|
const Sequences = {
|
|
98
|
+
Empty: new Uint8Array(0),
|
|
95
99
|
Cdata: new Uint8Array([0x43, 0x44, 0x41, 0x54, 0x41, 0x5b]), // CDATA[
|
|
96
100
|
CdataEnd: new Uint8Array([0x5d, 0x5d, 0x3e]), // ]]>
|
|
97
|
-
CommentEnd: new Uint8Array([0x2d, 0x2d, 0x3e]), //
|
|
101
|
+
CommentEnd: new Uint8Array([0x2d, 0x2d, 0x21, 0x3e]), // `--!>`
|
|
102
|
+
Doctype: new Uint8Array([0x64, 0x6f, 0x63, 0x74, 0x79, 0x70, 0x65]), // `doctype`
|
|
103
|
+
IframeEnd: new Uint8Array([0x3c, 0x2f, 0x69, 0x66, 0x72, 0x61, 0x6d, 0x65]), // `</iframe`
|
|
104
|
+
NoembedEnd: new Uint8Array([
|
|
105
|
+
0x3c, 0x2f, 0x6e, 0x6f, 0x65, 0x6d, 0x62, 0x65, 0x64,
|
|
106
|
+
]), // `</noembed`
|
|
107
|
+
NoframesEnd: new Uint8Array([
|
|
108
|
+
0x3c, 0x2f, 0x6e, 0x6f, 0x66, 0x72, 0x61, 0x6d, 0x65, 0x73,
|
|
109
|
+
]), // `</noframes`
|
|
110
|
+
Plaintext: new Uint8Array([
|
|
111
|
+
0x3c, 0x2f, 0x70, 0x6c, 0x61, 0x69, 0x6e, 0x74, 0x65, 0x78, 0x74,
|
|
112
|
+
]), // `</plaintext`
|
|
98
113
|
ScriptEnd: new Uint8Array([0x3c, 0x2f, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74]), // `</script`
|
|
99
114
|
StyleEnd: new Uint8Array([0x3c, 0x2f, 0x73, 0x74, 0x79, 0x6c, 0x65]), // `</style`
|
|
100
115
|
TitleEnd: new Uint8Array([0x3c, 0x2f, 0x74, 0x69, 0x74, 0x6c, 0x65]), // `</title`
|
|
@@ -103,31 +118,52 @@ const Sequences = {
|
|
|
103
118
|
]), // `</textarea`
|
|
104
119
|
XmpEnd: new Uint8Array([0x3c, 0x2f, 0x78, 0x6d, 0x70]), // `</xmp`
|
|
105
120
|
};
|
|
121
|
+
/**
|
|
122
|
+
* Maps the first lowercase character of an HTML tag name to the sequence
|
|
123
|
+
* used for special-tag detection. All sequences share a common layout
|
|
124
|
+
* where index 2 is the first tag-name character, so matching always
|
|
125
|
+
* continues from offset 3.
|
|
126
|
+
*/
|
|
127
|
+
const specialStartSequences = new Map([
|
|
128
|
+
[Sequences.IframeEnd[2], Sequences.IframeEnd],
|
|
129
|
+
[Sequences.NoembedEnd[2], Sequences.NoembedEnd],
|
|
130
|
+
[Sequences.Plaintext[2], Sequences.Plaintext],
|
|
131
|
+
[Sequences.ScriptEnd[2], Sequences.ScriptEnd],
|
|
132
|
+
[Sequences.TitleEnd[2], Sequences.TitleEnd],
|
|
133
|
+
[Sequences.XmpEnd[2], Sequences.XmpEnd],
|
|
134
|
+
]);
|
|
135
|
+
/**
|
|
136
|
+
* Tokenizer implementation used by `Parser`.
|
|
137
|
+
*/
|
|
106
138
|
export default class Tokenizer {
|
|
107
|
-
|
|
139
|
+
cbs;
|
|
140
|
+
/** The current state the tokenizer is in. */
|
|
141
|
+
state = State.Text;
|
|
142
|
+
/** The read buffer. */
|
|
143
|
+
buffer = "";
|
|
144
|
+
/** The beginning of the section that is currently being read. */
|
|
145
|
+
sectionStart = 0;
|
|
146
|
+
/** The index within the buffer that we are currently looking at. */
|
|
147
|
+
index = 0;
|
|
148
|
+
/** The start of the last entity. */
|
|
149
|
+
entityStart = 0;
|
|
150
|
+
/** Some behavior, eg. when decoding entities, is done while we are in another state. This keeps track of the other state type. */
|
|
151
|
+
baseState = State.Text;
|
|
152
|
+
/** For special parsing behavior inside of script and style tags. */
|
|
153
|
+
isSpecial = false;
|
|
154
|
+
/** Indicates whether the tokenizer has been paused. */
|
|
155
|
+
running = true;
|
|
156
|
+
/** The offset of the current buffer. */
|
|
157
|
+
offset = 0;
|
|
158
|
+
xmlMode;
|
|
159
|
+
decodeEntities;
|
|
160
|
+
recognizeSelfClosing;
|
|
161
|
+
entityDecoder;
|
|
162
|
+
constructor({ xmlMode = false, decodeEntities = true, recognizeSelfClosing = xmlMode, }, cbs) {
|
|
108
163
|
this.cbs = cbs;
|
|
109
|
-
/** The current state the tokenizer is in. */
|
|
110
|
-
this.state = State.Text;
|
|
111
|
-
/** The read buffer. */
|
|
112
|
-
this.buffer = "";
|
|
113
|
-
/** The beginning of the section that is currently being read. */
|
|
114
|
-
this.sectionStart = 0;
|
|
115
|
-
/** The index within the buffer that we are currently looking at. */
|
|
116
|
-
this.index = 0;
|
|
117
|
-
/** The start of the last entity. */
|
|
118
|
-
this.entityStart = 0;
|
|
119
|
-
/** Some behavior, eg. when decoding entities, is done while we are in another state. This keeps track of the other state type. */
|
|
120
|
-
this.baseState = State.Text;
|
|
121
|
-
/** For special parsing behavior inside of script and style tags. */
|
|
122
|
-
this.isSpecial = false;
|
|
123
|
-
/** Indicates whether the tokenizer has been paused. */
|
|
124
|
-
this.running = true;
|
|
125
|
-
/** The offset of the current buffer. */
|
|
126
|
-
this.offset = 0;
|
|
127
|
-
this.currentSequence = undefined;
|
|
128
|
-
this.sequenceIndex = 0;
|
|
129
164
|
this.xmlMode = xmlMode;
|
|
130
165
|
this.decodeEntities = decodeEntities;
|
|
166
|
+
this.recognizeSelfClosing = recognizeSelfClosing;
|
|
131
167
|
this.entityDecoder = new EntityDecoder(xmlMode ? xmlDecodeTree : htmlDecodeTree, (cp, consumed) => this.emitCodePoint(cp, consumed));
|
|
132
168
|
}
|
|
133
169
|
reset() {
|
|
@@ -136,7 +172,9 @@ export default class Tokenizer {
|
|
|
136
172
|
this.sectionStart = 0;
|
|
137
173
|
this.index = 0;
|
|
138
174
|
this.baseState = State.Text;
|
|
139
|
-
this.
|
|
175
|
+
this.isSpecial = false;
|
|
176
|
+
this.currentSequence = Sequences.Empty;
|
|
177
|
+
this.sequenceIndex = 0;
|
|
140
178
|
this.running = true;
|
|
141
179
|
this.offset = 0;
|
|
142
180
|
}
|
|
@@ -171,62 +209,74 @@ export default class Tokenizer {
|
|
|
171
209
|
this.startEntity();
|
|
172
210
|
}
|
|
173
211
|
}
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
if (
|
|
182
|
-
this.
|
|
183
|
-
}
|
|
184
|
-
else if (!isEnd) {
|
|
185
|
-
this.sequenceIndex++;
|
|
186
|
-
return;
|
|
187
|
-
}
|
|
188
|
-
this.sequenceIndex = 0;
|
|
189
|
-
this.state = State.InTagName;
|
|
190
|
-
this.stateInTagName(c);
|
|
191
|
-
}
|
|
192
|
-
/** Look for an end tag. For <title> tags, also decode entities. */
|
|
193
|
-
stateInSpecialTag(c) {
|
|
194
|
-
if (this.sequenceIndex === this.currentSequence.length) {
|
|
195
|
-
if (c === CharCodes.Gt || isWhitespace(c)) {
|
|
196
|
-
const endOfText = this.index - this.currentSequence.length;
|
|
197
|
-
if (this.sectionStart < endOfText) {
|
|
198
|
-
// Spoof the index so that reported locations match up.
|
|
199
|
-
const actualIndex = this.index;
|
|
200
|
-
this.index = endOfText;
|
|
201
|
-
this.cbs.ontext(this.sectionStart, endOfText);
|
|
202
|
-
this.index = actualIndex;
|
|
203
|
-
}
|
|
204
|
-
this.isSpecial = false;
|
|
205
|
-
this.sectionStart = endOfText + 2; // Skip over the `</`
|
|
206
|
-
this.stateInClosingTagName(c);
|
|
207
|
-
return; // We are done; skip the rest of the function.
|
|
208
|
-
}
|
|
212
|
+
currentSequence = Sequences.Empty;
|
|
213
|
+
sequenceIndex = 0;
|
|
214
|
+
enterTagBody() {
|
|
215
|
+
if (this.currentSequence === Sequences.Plaintext) {
|
|
216
|
+
this.currentSequence = Sequences.Empty;
|
|
217
|
+
this.state = State.InPlainText;
|
|
218
|
+
}
|
|
219
|
+
else if (this.isSpecial) {
|
|
220
|
+
this.state = State.InSpecialTag;
|
|
209
221
|
this.sequenceIndex = 0;
|
|
210
222
|
}
|
|
211
|
-
|
|
212
|
-
this.
|
|
223
|
+
else {
|
|
224
|
+
this.state = State.Text;
|
|
213
225
|
}
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
226
|
+
}
|
|
227
|
+
/**
|
|
228
|
+
* Match the opening tag name against an HTML text-only tag sequence.
|
|
229
|
+
*
|
|
230
|
+
* Some tags share an initial prefix (`script`/`style`, `title`/`textarea`,
|
|
231
|
+
* `noembed`/`noframes`), so we may switch to an alternate sequence at the
|
|
232
|
+
* first distinguishing byte. On a successful full match we fall back to
|
|
233
|
+
* the normal tag-name state; a later `>` will enter raw-text, RCDATA, or
|
|
234
|
+
* plaintext mode based on `currentSequence` / `isSpecial`.
|
|
235
|
+
* @param c Current character code point.
|
|
236
|
+
*/
|
|
237
|
+
stateSpecialStartSequence(c) {
|
|
238
|
+
const lower = c | 0x20;
|
|
239
|
+
// Still matching — check for an alternate sequence at branch points.
|
|
240
|
+
if (this.sequenceIndex < this.currentSequence.length) {
|
|
241
|
+
if (lower === this.currentSequence[this.sequenceIndex]) {
|
|
242
|
+
this.sequenceIndex++;
|
|
243
|
+
return;
|
|
244
|
+
}
|
|
245
|
+
if (this.sequenceIndex === 3) {
|
|
246
|
+
if (this.currentSequence === Sequences.ScriptEnd &&
|
|
247
|
+
lower === Sequences.StyleEnd[3]) {
|
|
248
|
+
this.currentSequence = Sequences.StyleEnd;
|
|
249
|
+
this.sequenceIndex = 4;
|
|
250
|
+
return;
|
|
251
|
+
}
|
|
252
|
+
if (this.currentSequence === Sequences.TitleEnd &&
|
|
253
|
+
lower === Sequences.TextareaEnd[3]) {
|
|
254
|
+
this.currentSequence = Sequences.TextareaEnd;
|
|
255
|
+
this.sequenceIndex = 4;
|
|
256
|
+
return;
|
|
219
257
|
}
|
|
220
258
|
}
|
|
221
|
-
else if (this.
|
|
222
|
-
|
|
223
|
-
|
|
259
|
+
else if (this.sequenceIndex === 4 &&
|
|
260
|
+
this.currentSequence === Sequences.NoembedEnd &&
|
|
261
|
+
lower === Sequences.NoframesEnd[4]) {
|
|
262
|
+
this.currentSequence = Sequences.NoframesEnd;
|
|
263
|
+
this.sequenceIndex = 5;
|
|
264
|
+
return;
|
|
224
265
|
}
|
|
225
266
|
}
|
|
226
|
-
else {
|
|
227
|
-
//
|
|
228
|
-
this.sequenceIndex =
|
|
267
|
+
else if (isEndOfTagSection(c)) {
|
|
268
|
+
// Full match on a valid tag boundary — keep the sequence.
|
|
269
|
+
this.sequenceIndex = 0;
|
|
270
|
+
this.state = State.InTagName;
|
|
271
|
+
this.stateInTagName(c);
|
|
272
|
+
return;
|
|
229
273
|
}
|
|
274
|
+
// No match — abandon special-tag detection.
|
|
275
|
+
this.isSpecial = false;
|
|
276
|
+
this.currentSequence = Sequences.Empty;
|
|
277
|
+
this.sequenceIndex = 0;
|
|
278
|
+
this.state = State.InTagName;
|
|
279
|
+
this.stateInTagName(c);
|
|
230
280
|
}
|
|
231
281
|
stateCDATASequence(c) {
|
|
232
282
|
if (c === Sequences.Cdata[this.sequenceIndex]) {
|
|
@@ -239,14 +289,20 @@ export default class Tokenizer {
|
|
|
239
289
|
}
|
|
240
290
|
else {
|
|
241
291
|
this.sequenceIndex = 0;
|
|
242
|
-
this.
|
|
243
|
-
|
|
292
|
+
if (this.xmlMode) {
|
|
293
|
+
this.state = State.InDeclaration;
|
|
294
|
+
this.stateInDeclaration(c); // Reconsume the character
|
|
295
|
+
}
|
|
296
|
+
else {
|
|
297
|
+
this.state = State.InSpecialComment;
|
|
298
|
+
this.stateInSpecialComment(c); // Reconsume the character
|
|
299
|
+
}
|
|
244
300
|
}
|
|
245
301
|
}
|
|
246
302
|
/**
|
|
247
303
|
* When we wait for one specific character, we can speed things up
|
|
248
304
|
* by skipping through the buffer until we find it.
|
|
249
|
-
*
|
|
305
|
+
* @param c Current character code point.
|
|
250
306
|
* @returns Whether the character was found.
|
|
251
307
|
*/
|
|
252
308
|
fastForwardTo(c) {
|
|
@@ -264,6 +320,16 @@ export default class Tokenizer {
|
|
|
264
320
|
this.index = this.buffer.length + this.offset - 1;
|
|
265
321
|
return false;
|
|
266
322
|
}
|
|
323
|
+
/**
|
|
324
|
+
* Emit a comment token and return to the text state.
|
|
325
|
+
* @param offset Number of characters in the end sequence that have already been matched.
|
|
326
|
+
*/
|
|
327
|
+
emitComment(offset) {
|
|
328
|
+
this.cbs.oncomment(this.sectionStart, this.index, offset);
|
|
329
|
+
this.sequenceIndex = 0;
|
|
330
|
+
this.sectionStart = this.index + 1;
|
|
331
|
+
this.state = State.Text;
|
|
332
|
+
}
|
|
267
333
|
/**
|
|
268
334
|
* Comments and CDATA end with `-->` and `]]>`.
|
|
269
335
|
*
|
|
@@ -271,15 +337,40 @@ export default class Tokenizer {
|
|
|
271
337
|
* - Their end sequences have a distinct character they start with.
|
|
272
338
|
* - That character is then repeated, so we have to check multiple repeats.
|
|
273
339
|
* - All characters but the start character of the sequence can be skipped.
|
|
340
|
+
* @param c Current character code point.
|
|
274
341
|
*/
|
|
275
342
|
stateInCommentLike(c) {
|
|
276
|
-
if (
|
|
343
|
+
if (!this.xmlMode &&
|
|
344
|
+
this.currentSequence === Sequences.CommentEnd &&
|
|
345
|
+
this.sequenceIndex <= 1 &&
|
|
346
|
+
/*
|
|
347
|
+
* We're still at the very start of the comment: the only
|
|
348
|
+
* characters consumed since `<!--` are the dashes that
|
|
349
|
+
* advanced sequenceIndex (0 for `<!-->`, 1 for `<!--->`).
|
|
350
|
+
*/
|
|
351
|
+
this.index === this.sectionStart + this.sequenceIndex &&
|
|
352
|
+
c === CharCodes.Gt) {
|
|
353
|
+
// Abruptly closed empty HTML comment.
|
|
354
|
+
this.emitComment(this.sequenceIndex);
|
|
355
|
+
}
|
|
356
|
+
else if (this.currentSequence === Sequences.CommentEnd &&
|
|
357
|
+
this.sequenceIndex === 2 &&
|
|
358
|
+
c === CharCodes.Gt) {
|
|
359
|
+
// `!` is optional here, so the same sequence also accepts `-->`.
|
|
360
|
+
this.emitComment(2);
|
|
361
|
+
}
|
|
362
|
+
else if (this.currentSequence === Sequences.CommentEnd &&
|
|
363
|
+
this.sequenceIndex === this.currentSequence.length - 1 &&
|
|
364
|
+
c !== CharCodes.Gt) {
|
|
365
|
+
this.sequenceIndex = Number(c === CharCodes.Dash);
|
|
366
|
+
}
|
|
367
|
+
else if (c === this.currentSequence[this.sequenceIndex]) {
|
|
277
368
|
if (++this.sequenceIndex === this.currentSequence.length) {
|
|
278
369
|
if (this.currentSequence === Sequences.CdataEnd) {
|
|
279
370
|
this.cbs.oncdata(this.sectionStart, this.index, 2);
|
|
280
371
|
}
|
|
281
372
|
else {
|
|
282
|
-
this.cbs.oncomment(this.sectionStart, this.index,
|
|
373
|
+
this.cbs.oncomment(this.sectionStart, this.index, 3);
|
|
283
374
|
}
|
|
284
375
|
this.sequenceIndex = 0;
|
|
285
376
|
this.sectionStart = this.index + 1;
|
|
@@ -302,15 +393,56 @@ export default class Tokenizer {
|
|
|
302
393
|
*
|
|
303
394
|
* XML allows a lot more characters here (@see https://www.w3.org/TR/REC-xml/#NT-NameStartChar).
|
|
304
395
|
* We allow anything that wouldn't end the tag.
|
|
396
|
+
* @param c Current character code point.
|
|
305
397
|
*/
|
|
306
398
|
isTagStartChar(c) {
|
|
307
399
|
return this.xmlMode ? !isEndOfTagSection(c) : isASCIIAlpha(c);
|
|
308
400
|
}
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
401
|
+
/**
|
|
402
|
+
* Scan raw-text / RCDATA content for the matching end tag.
|
|
403
|
+
*
|
|
404
|
+
* For RCDATA tags (`<title>`, `<textarea>`) entities are decoded inline.
|
|
405
|
+
* For raw-text tags (`<script>`, `<style>`, etc.) we fast-forward to `<`.
|
|
406
|
+
* @param c Current character code point.
|
|
407
|
+
*/
|
|
408
|
+
stateInSpecialTag(c) {
|
|
409
|
+
if (this.sequenceIndex === this.currentSequence.length) {
|
|
410
|
+
if (isEndOfTagSection(c)) {
|
|
411
|
+
const endOfText = this.index - this.currentSequence.length;
|
|
412
|
+
if (this.sectionStart < endOfText) {
|
|
413
|
+
// Spoof the index so that reported locations match up.
|
|
414
|
+
const actualIndex = this.index;
|
|
415
|
+
this.index = endOfText;
|
|
416
|
+
this.cbs.ontext(this.sectionStart, endOfText);
|
|
417
|
+
this.index = actualIndex;
|
|
418
|
+
}
|
|
419
|
+
this.isSpecial = false;
|
|
420
|
+
this.sectionStart = endOfText + 2; // Skip over the `</`
|
|
421
|
+
this.stateInClosingTagName(c);
|
|
422
|
+
return; // We are done; skip the rest of the function.
|
|
423
|
+
}
|
|
424
|
+
this.sequenceIndex = 0;
|
|
425
|
+
}
|
|
426
|
+
if ((c | 0x20) === this.currentSequence[this.sequenceIndex]) {
|
|
427
|
+
this.sequenceIndex += 1;
|
|
428
|
+
}
|
|
429
|
+
else if (this.sequenceIndex === 0) {
|
|
430
|
+
if (this.currentSequence === Sequences.TitleEnd ||
|
|
431
|
+
this.currentSequence === Sequences.TextareaEnd) {
|
|
432
|
+
// RCDATA tags have to parse entities while still looking for their end tag.
|
|
433
|
+
if (this.decodeEntities && c === CharCodes.Amp) {
|
|
434
|
+
this.startEntity();
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
else if (this.fastForwardTo(CharCodes.Lt)) {
|
|
438
|
+
// Outside of RCDATA tags, we can fast-forward.
|
|
439
|
+
this.sequenceIndex = 1;
|
|
440
|
+
}
|
|
441
|
+
}
|
|
442
|
+
else {
|
|
443
|
+
// If we see a `<`, set the sequence index to 1; useful for eg. `<</script>`.
|
|
444
|
+
this.sequenceIndex = Number(c === CharCodes.Lt);
|
|
445
|
+
}
|
|
314
446
|
}
|
|
315
447
|
stateBeforeTagName(c) {
|
|
316
448
|
if (c === CharCodes.ExclamationMark) {
|
|
@@ -318,24 +450,29 @@ export default class Tokenizer {
|
|
|
318
450
|
this.sectionStart = this.index + 1;
|
|
319
451
|
}
|
|
320
452
|
else if (c === CharCodes.Questionmark) {
|
|
321
|
-
this.
|
|
322
|
-
|
|
453
|
+
if (this.xmlMode) {
|
|
454
|
+
this.state = State.InProcessingInstruction;
|
|
455
|
+
this.sequenceIndex = 0;
|
|
456
|
+
this.sectionStart = this.index + 1;
|
|
457
|
+
}
|
|
458
|
+
else {
|
|
459
|
+
this.state = State.InSpecialComment;
|
|
460
|
+
this.sectionStart = this.index;
|
|
461
|
+
}
|
|
323
462
|
}
|
|
324
463
|
else if (this.isTagStartChar(c)) {
|
|
325
|
-
const lower = c | 0x20;
|
|
326
464
|
this.sectionStart = this.index;
|
|
327
|
-
|
|
465
|
+
const special = this.xmlMode || this.cbs.isInForeignContext?.()
|
|
466
|
+
? undefined
|
|
467
|
+
: specialStartSequences.get(c | 0x20);
|
|
468
|
+
if (special === undefined) {
|
|
328
469
|
this.state = State.InTagName;
|
|
329
470
|
}
|
|
330
|
-
else if (lower === Sequences.ScriptEnd[2]) {
|
|
331
|
-
this.state = State.BeforeSpecialS;
|
|
332
|
-
}
|
|
333
|
-
else if (lower === Sequences.TitleEnd[2] ||
|
|
334
|
-
lower === Sequences.XmpEnd[2]) {
|
|
335
|
-
this.state = State.BeforeSpecialT;
|
|
336
|
-
}
|
|
337
471
|
else {
|
|
338
|
-
this.
|
|
472
|
+
this.isSpecial = true;
|
|
473
|
+
this.currentSequence = special;
|
|
474
|
+
this.sequenceIndex = 3;
|
|
475
|
+
this.state = State.SpecialStartSequence;
|
|
339
476
|
}
|
|
340
477
|
}
|
|
341
478
|
else if (c === CharCodes.Slash) {
|
|
@@ -356,10 +493,19 @@ export default class Tokenizer {
|
|
|
356
493
|
}
|
|
357
494
|
stateBeforeClosingTagName(c) {
|
|
358
495
|
if (isWhitespace(c)) {
|
|
359
|
-
|
|
496
|
+
if (this.xmlMode) {
|
|
497
|
+
// Ignore
|
|
498
|
+
}
|
|
499
|
+
else {
|
|
500
|
+
this.state = State.InSpecialComment;
|
|
501
|
+
this.sectionStart = this.index;
|
|
502
|
+
}
|
|
360
503
|
}
|
|
361
504
|
else if (c === CharCodes.Gt) {
|
|
362
505
|
this.state = State.Text;
|
|
506
|
+
if (!this.xmlMode) {
|
|
507
|
+
this.sectionStart = this.index + 1;
|
|
508
|
+
}
|
|
363
509
|
}
|
|
364
510
|
else {
|
|
365
511
|
this.state = this.isTagStartChar(c)
|
|
@@ -369,7 +515,7 @@ export default class Tokenizer {
|
|
|
369
515
|
}
|
|
370
516
|
}
|
|
371
517
|
stateInClosingTagName(c) {
|
|
372
|
-
if (
|
|
518
|
+
if (isEndOfTagSection(c)) {
|
|
373
519
|
this.cbs.onclosetag(this.sectionStart, this.index);
|
|
374
520
|
this.sectionStart = -1;
|
|
375
521
|
this.state = State.AfterClosingTagName;
|
|
@@ -386,13 +532,7 @@ export default class Tokenizer {
|
|
|
386
532
|
stateBeforeAttributeName(c) {
|
|
387
533
|
if (c === CharCodes.Gt) {
|
|
388
534
|
this.cbs.onopentagend(this.index);
|
|
389
|
-
|
|
390
|
-
this.state = State.InSpecialTag;
|
|
391
|
-
this.sequenceIndex = 0;
|
|
392
|
-
}
|
|
393
|
-
else {
|
|
394
|
-
this.state = State.Text;
|
|
395
|
-
}
|
|
535
|
+
this.enterTagBody();
|
|
396
536
|
this.sectionStart = this.index + 1;
|
|
397
537
|
}
|
|
398
538
|
else if (c === CharCodes.Slash) {
|
|
@@ -403,12 +543,26 @@ export default class Tokenizer {
|
|
|
403
543
|
this.sectionStart = this.index;
|
|
404
544
|
}
|
|
405
545
|
}
|
|
546
|
+
/**
|
|
547
|
+
* Handle `/` before `>` in an opening tag.
|
|
548
|
+
*
|
|
549
|
+
* In HTML mode, text-only tags ignore the self-closing flag and still enter
|
|
550
|
+
* their raw-text/RCDATA/plaintext state unless self-closing tags are being
|
|
551
|
+
* recognized. In XML mode, or for ordinary tags, the tokenizer returns to
|
|
552
|
+
* regular text parsing after emitting the self-closing callback.
|
|
553
|
+
* @param c Current character code point.
|
|
554
|
+
*/
|
|
406
555
|
stateInSelfClosingTag(c) {
|
|
407
556
|
if (c === CharCodes.Gt) {
|
|
408
557
|
this.cbs.onselfclosingtag(this.index);
|
|
409
|
-
this.state = State.Text;
|
|
410
558
|
this.sectionStart = this.index + 1;
|
|
559
|
+
if (!this.recognizeSelfClosing) {
|
|
560
|
+
this.enterTagBody();
|
|
561
|
+
return;
|
|
562
|
+
}
|
|
563
|
+
this.state = State.Text;
|
|
411
564
|
this.isSpecial = false; // Reset special state, in case of self-closing special tags
|
|
565
|
+
this.currentSequence = Sequences.Empty;
|
|
412
566
|
}
|
|
413
567
|
else if (!isWhitespace(c)) {
|
|
414
568
|
this.state = State.BeforeAttributeName;
|
|
@@ -486,17 +640,66 @@ export default class Tokenizer {
|
|
|
486
640
|
this.startEntity();
|
|
487
641
|
}
|
|
488
642
|
}
|
|
643
|
+
/**
|
|
644
|
+
* Distinguish between CDATA, declarations, HTML comments, and HTML bogus
|
|
645
|
+
* comments after `<!`.
|
|
646
|
+
*
|
|
647
|
+
* In HTML mode, only real comments and doctypes stay on declaration paths;
|
|
648
|
+
* everything else becomes a bogus comment terminated by the next `>`.
|
|
649
|
+
* @param c Current character code point.
|
|
650
|
+
*/
|
|
489
651
|
stateBeforeDeclaration(c) {
|
|
490
652
|
if (c === CharCodes.OpeningSquareBracket) {
|
|
491
653
|
this.state = State.CDATASequence;
|
|
492
654
|
this.sequenceIndex = 0;
|
|
493
655
|
}
|
|
494
|
-
else {
|
|
656
|
+
else if (this.xmlMode) {
|
|
495
657
|
this.state =
|
|
496
658
|
c === CharCodes.Dash
|
|
497
659
|
? State.BeforeComment
|
|
498
660
|
: State.InDeclaration;
|
|
499
661
|
}
|
|
662
|
+
else if ((c | 0x20) === Sequences.Doctype[0]) {
|
|
663
|
+
this.state = State.DeclarationSequence;
|
|
664
|
+
this.currentSequence = Sequences.Doctype;
|
|
665
|
+
this.sequenceIndex = 1;
|
|
666
|
+
}
|
|
667
|
+
else if (c === CharCodes.Gt) {
|
|
668
|
+
this.cbs.oncomment(this.sectionStart, this.index, 0);
|
|
669
|
+
this.state = State.Text;
|
|
670
|
+
this.sectionStart = this.index + 1;
|
|
671
|
+
}
|
|
672
|
+
else if (c === CharCodes.Dash) {
|
|
673
|
+
this.state = State.BeforeComment;
|
|
674
|
+
}
|
|
675
|
+
else {
|
|
676
|
+
this.state = State.InSpecialComment;
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
/**
|
|
680
|
+
* Continue matching `doctype` after `<!d`.
|
|
681
|
+
*
|
|
682
|
+
* A full `doctype` match stays on the declaration path; any other name falls
|
|
683
|
+
* back to an HTML bogus comment, which matches browser behavior for
|
|
684
|
+
* non-doctype `<!...>` constructs.
|
|
685
|
+
* @param c Current character code point.
|
|
686
|
+
*/
|
|
687
|
+
stateDeclarationSequence(c) {
|
|
688
|
+
if (this.sequenceIndex === this.currentSequence.length) {
|
|
689
|
+
this.state = State.InDeclaration;
|
|
690
|
+
this.stateInDeclaration(c);
|
|
691
|
+
}
|
|
692
|
+
else if ((c | 0x20) === this.currentSequence[this.sequenceIndex]) {
|
|
693
|
+
this.sequenceIndex += 1;
|
|
694
|
+
}
|
|
695
|
+
else if (c === CharCodes.Gt) {
|
|
696
|
+
this.cbs.oncomment(this.sectionStart, this.index, 0);
|
|
697
|
+
this.state = State.Text;
|
|
698
|
+
this.sectionStart = this.index + 1;
|
|
699
|
+
}
|
|
700
|
+
else {
|
|
701
|
+
this.state = State.InSpecialComment;
|
|
702
|
+
}
|
|
500
703
|
}
|
|
501
704
|
stateInDeclaration(c) {
|
|
502
705
|
if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) {
|
|
@@ -505,64 +708,53 @@ export default class Tokenizer {
|
|
|
505
708
|
this.sectionStart = this.index + 1;
|
|
506
709
|
}
|
|
507
710
|
}
|
|
711
|
+
/**
|
|
712
|
+
* XML processing instructions (`<?...?>`).
|
|
713
|
+
*
|
|
714
|
+
* In HTML mode `<?` is routed to `InSpecialComment` instead, so this
|
|
715
|
+
* state is only reachable in XML mode.
|
|
716
|
+
* @param c Current character code point.
|
|
717
|
+
*/
|
|
508
718
|
stateInProcessingInstruction(c) {
|
|
509
|
-
if (c === CharCodes.
|
|
510
|
-
|
|
719
|
+
if (c === CharCodes.Questionmark) {
|
|
720
|
+
// Remember that we just consumed `?`, so the next `>` closes the PI.
|
|
721
|
+
this.sequenceIndex = 1;
|
|
722
|
+
}
|
|
723
|
+
else if (c === CharCodes.Gt && this.sequenceIndex === 1) {
|
|
724
|
+
this.cbs.onprocessinginstruction(this.sectionStart, this.index - 1);
|
|
725
|
+
this.sequenceIndex = 0;
|
|
511
726
|
this.state = State.Text;
|
|
512
727
|
this.sectionStart = this.index + 1;
|
|
513
728
|
}
|
|
729
|
+
else {
|
|
730
|
+
// Keep scanning for the next `?`, which can start a closing `?>`.
|
|
731
|
+
this.sequenceIndex = Number(this.fastForwardTo(CharCodes.Questionmark));
|
|
732
|
+
}
|
|
514
733
|
}
|
|
515
734
|
stateBeforeComment(c) {
|
|
516
735
|
if (c === CharCodes.Dash) {
|
|
517
736
|
this.state = State.InCommentLike;
|
|
518
737
|
this.currentSequence = Sequences.CommentEnd;
|
|
519
|
-
|
|
520
|
-
this.sequenceIndex = 2;
|
|
738
|
+
this.sequenceIndex = 0;
|
|
521
739
|
this.sectionStart = this.index + 1;
|
|
522
740
|
}
|
|
523
|
-
else {
|
|
741
|
+
else if (this.xmlMode) {
|
|
524
742
|
this.state = State.InDeclaration;
|
|
525
743
|
}
|
|
526
|
-
|
|
527
|
-
stateInSpecialComment(c) {
|
|
528
|
-
if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) {
|
|
744
|
+
else if (c === CharCodes.Gt) {
|
|
529
745
|
this.cbs.oncomment(this.sectionStart, this.index, 0);
|
|
530
746
|
this.state = State.Text;
|
|
531
747
|
this.sectionStart = this.index + 1;
|
|
532
748
|
}
|
|
533
|
-
}
|
|
534
|
-
stateBeforeSpecialS(c) {
|
|
535
|
-
const lower = c | 0x20;
|
|
536
|
-
if (lower === Sequences.ScriptEnd[3]) {
|
|
537
|
-
this.startSpecial(Sequences.ScriptEnd, 4);
|
|
538
|
-
}
|
|
539
|
-
else if (lower === Sequences.StyleEnd[3]) {
|
|
540
|
-
this.startSpecial(Sequences.StyleEnd, 4);
|
|
541
|
-
}
|
|
542
749
|
else {
|
|
543
|
-
this.state = State.
|
|
544
|
-
this.stateInTagName(c); // Consume the token again
|
|
750
|
+
this.state = State.InSpecialComment;
|
|
545
751
|
}
|
|
546
752
|
}
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
break;
|
|
553
|
-
}
|
|
554
|
-
case Sequences.TextareaEnd[3]: {
|
|
555
|
-
this.startSpecial(Sequences.TextareaEnd, 4);
|
|
556
|
-
break;
|
|
557
|
-
}
|
|
558
|
-
case Sequences.XmpEnd[3]: {
|
|
559
|
-
this.startSpecial(Sequences.XmpEnd, 4);
|
|
560
|
-
break;
|
|
561
|
-
}
|
|
562
|
-
default: {
|
|
563
|
-
this.state = State.InTagName;
|
|
564
|
-
this.stateInTagName(c); // Consume the token again
|
|
565
|
-
}
|
|
753
|
+
stateInSpecialComment(c) {
|
|
754
|
+
if (c === CharCodes.Gt || this.fastForwardTo(CharCodes.Gt)) {
|
|
755
|
+
this.cbs.oncomment(this.sectionStart, this.index, 0);
|
|
756
|
+
this.state = State.Text;
|
|
757
|
+
this.sectionStart = this.index + 1;
|
|
566
758
|
}
|
|
567
759
|
}
|
|
568
760
|
startEntity() {
|
|
@@ -604,6 +796,7 @@ export default class Tokenizer {
|
|
|
604
796
|
// If we are inside of text or attributes, emit what we already have.
|
|
605
797
|
if (this.running && this.sectionStart !== this.index) {
|
|
606
798
|
if (this.state === State.Text ||
|
|
799
|
+
this.state === State.InPlainText ||
|
|
607
800
|
(this.state === State.InSpecialTag && this.sequenceIndex === 0)) {
|
|
608
801
|
this.cbs.ontext(this.sectionStart, this.index);
|
|
609
802
|
this.sectionStart = this.index;
|
|
@@ -632,6 +825,11 @@ export default class Tokenizer {
|
|
|
632
825
|
this.stateText(c);
|
|
633
826
|
break;
|
|
634
827
|
}
|
|
828
|
+
case State.InPlainText: {
|
|
829
|
+
// Skip to end of buffer; cleanup() emits the text.
|
|
830
|
+
this.index = this.buffer.length + this.offset - 1;
|
|
831
|
+
break;
|
|
832
|
+
}
|
|
635
833
|
case State.SpecialStartSequence: {
|
|
636
834
|
this.stateSpecialStartSequence(c);
|
|
637
835
|
break;
|
|
@@ -644,6 +842,10 @@ export default class Tokenizer {
|
|
|
644
842
|
this.stateCDATASequence(c);
|
|
645
843
|
break;
|
|
646
844
|
}
|
|
845
|
+
case State.DeclarationSequence: {
|
|
846
|
+
this.stateDeclarationSequence(c);
|
|
847
|
+
break;
|
|
848
|
+
}
|
|
647
849
|
case State.InAttributeValueDq: {
|
|
648
850
|
this.stateInAttributeValueDoubleQuotes(c);
|
|
649
851
|
break;
|
|
@@ -696,14 +898,6 @@ export default class Tokenizer {
|
|
|
696
898
|
this.stateAfterClosingTagName(c);
|
|
697
899
|
break;
|
|
698
900
|
}
|
|
699
|
-
case State.BeforeSpecialS: {
|
|
700
|
-
this.stateBeforeSpecialS(c);
|
|
701
|
-
break;
|
|
702
|
-
}
|
|
703
|
-
case State.BeforeSpecialT: {
|
|
704
|
-
this.stateBeforeSpecialT(c);
|
|
705
|
-
break;
|
|
706
|
-
}
|
|
707
901
|
case State.InAttributeValueNq: {
|
|
708
902
|
this.stateInAttributeValueNoQuotes(c);
|
|
709
903
|
break;
|
|
@@ -745,38 +939,99 @@ export default class Tokenizer {
|
|
|
745
939
|
this.handleTrailingData();
|
|
746
940
|
this.cbs.onend();
|
|
747
941
|
}
|
|
942
|
+
handleTrailingCommentLikeData(endIndex) {
|
|
943
|
+
if (this.state !== State.InCommentLike) {
|
|
944
|
+
return false;
|
|
945
|
+
}
|
|
946
|
+
if (this.currentSequence === Sequences.CdataEnd) {
|
|
947
|
+
if (this.xmlMode) {
|
|
948
|
+
if (this.sectionStart < endIndex) {
|
|
949
|
+
this.cbs.oncdata(this.sectionStart, endIndex, 0);
|
|
950
|
+
}
|
|
951
|
+
}
|
|
952
|
+
else {
|
|
953
|
+
/* In HTML mode, unclosed CDATA is a bogus comment. */
|
|
954
|
+
const cdataStart = this.sectionStart - Sequences.Cdata.length - 1;
|
|
955
|
+
this.cbs.oncomment(cdataStart, endIndex, 0);
|
|
956
|
+
}
|
|
957
|
+
}
|
|
958
|
+
else {
|
|
959
|
+
const offset = this.xmlMode
|
|
960
|
+
? 0
|
|
961
|
+
: Math.min(this.sequenceIndex, Sequences.CommentEnd.length - 1);
|
|
962
|
+
this.cbs.oncomment(this.sectionStart, endIndex, offset);
|
|
963
|
+
}
|
|
964
|
+
return true;
|
|
965
|
+
}
|
|
966
|
+
handleTrailingMarkupDeclaration(endIndex) {
|
|
967
|
+
if (this.xmlMode) {
|
|
968
|
+
switch (this.state) {
|
|
969
|
+
case State.InSpecialComment:
|
|
970
|
+
case State.BeforeComment:
|
|
971
|
+
case State.CDATASequence:
|
|
972
|
+
case State.DeclarationSequence:
|
|
973
|
+
case State.InDeclaration: {
|
|
974
|
+
this.cbs.ontext(this.sectionStart, endIndex);
|
|
975
|
+
return true;
|
|
976
|
+
}
|
|
977
|
+
default: {
|
|
978
|
+
return false;
|
|
979
|
+
}
|
|
980
|
+
}
|
|
981
|
+
}
|
|
982
|
+
switch (this.state) {
|
|
983
|
+
case State.BeforeDeclaration:
|
|
984
|
+
case State.InSpecialComment:
|
|
985
|
+
case State.BeforeComment:
|
|
986
|
+
case State.CDATASequence: {
|
|
987
|
+
this.cbs.oncomment(this.sectionStart, endIndex, 0);
|
|
988
|
+
return true;
|
|
989
|
+
}
|
|
990
|
+
case State.DeclarationSequence: {
|
|
991
|
+
if (this.sequenceIndex !== Sequences.Doctype.length) {
|
|
992
|
+
this.cbs.oncomment(this.sectionStart, endIndex, 0);
|
|
993
|
+
}
|
|
994
|
+
return true;
|
|
995
|
+
}
|
|
996
|
+
case State.InDeclaration: {
|
|
997
|
+
return true;
|
|
998
|
+
}
|
|
999
|
+
default: {
|
|
1000
|
+
return false;
|
|
1001
|
+
}
|
|
1002
|
+
}
|
|
1003
|
+
}
|
|
748
1004
|
/** Handle any trailing data. */
|
|
749
1005
|
handleTrailingData() {
|
|
750
1006
|
const endIndex = this.buffer.length + this.offset;
|
|
1007
|
+
if (this.handleTrailingCommentLikeData(endIndex) ||
|
|
1008
|
+
this.handleTrailingMarkupDeclaration(endIndex)) {
|
|
1009
|
+
return;
|
|
1010
|
+
}
|
|
751
1011
|
// If there is no remaining data, we are done.
|
|
752
1012
|
if (this.sectionStart >= endIndex) {
|
|
753
1013
|
return;
|
|
754
1014
|
}
|
|
755
|
-
|
|
756
|
-
|
|
757
|
-
|
|
1015
|
+
switch (this.state) {
|
|
1016
|
+
case State.InTagName:
|
|
1017
|
+
case State.BeforeAttributeName:
|
|
1018
|
+
case State.BeforeAttributeValue:
|
|
1019
|
+
case State.AfterAttributeName:
|
|
1020
|
+
case State.InAttributeName:
|
|
1021
|
+
case State.InAttributeValueSq:
|
|
1022
|
+
case State.InAttributeValueDq:
|
|
1023
|
+
case State.InAttributeValueNq:
|
|
1024
|
+
case State.InClosingTagName: {
|
|
1025
|
+
/*
|
|
1026
|
+
* If we are currently in an opening or closing tag, us not calling the
|
|
1027
|
+
* respective callback signals that the tag should be ignored.
|
|
1028
|
+
*/
|
|
1029
|
+
break;
|
|
758
1030
|
}
|
|
759
|
-
|
|
760
|
-
this.cbs.
|
|
1031
|
+
default: {
|
|
1032
|
+
this.cbs.ontext(this.sectionStart, endIndex);
|
|
761
1033
|
}
|
|
762
1034
|
}
|
|
763
|
-
else if (this.state === State.InTagName ||
|
|
764
|
-
this.state === State.BeforeAttributeName ||
|
|
765
|
-
this.state === State.BeforeAttributeValue ||
|
|
766
|
-
this.state === State.AfterAttributeName ||
|
|
767
|
-
this.state === State.InAttributeName ||
|
|
768
|
-
this.state === State.InAttributeValueSq ||
|
|
769
|
-
this.state === State.InAttributeValueDq ||
|
|
770
|
-
this.state === State.InAttributeValueNq ||
|
|
771
|
-
this.state === State.InClosingTagName) {
|
|
772
|
-
/*
|
|
773
|
-
* If we are currently in an opening or closing tag, us not calling the
|
|
774
|
-
* respective callback signals that the tag should be ignored.
|
|
775
|
-
*/
|
|
776
|
-
}
|
|
777
|
-
else {
|
|
778
|
-
this.cbs.ontext(this.sectionStart, endIndex);
|
|
779
|
-
}
|
|
780
1035
|
}
|
|
781
1036
|
emitCodePoint(cp, consumed) {
|
|
782
1037
|
if (this.baseState !== State.Text &&
|