/*! * Jodit Editor (https://xdsoft.net/jodit/) * Released under MIT see LICENSE.txt in the project root for license information. * Copyright (c) 2013-2026 Valerii Chupurnov. All rights reserved. https://xdsoft.net */ /** * Detect if string is HTML from MS Word, Excel or LibreOffice/OpenOffice * * The clipboard text is attacker controlled, so every check walks the string * once with `indexOf`: a regex with an unbounded group before a required * literal was quadratic on a long run of `