mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-10-30 01:59:23 +00:00
fix(ui): codeql-1693 Incomplete multi-character sanitization fix (#23738)
This commit is contained in:
parent
cf75d76bc8
commit
dfda6323c5
@ -11,6 +11,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
import { expect, Page } from '@playwright/test';
|
||||
import { JSDOM } from 'jsdom';
|
||||
import { isEmpty, lowerCase } from 'lodash';
|
||||
import {
|
||||
BIG_ENTITY_DELETE_TIMEOUT,
|
||||
@ -1876,7 +1877,9 @@ export const getTextFromHtmlString = (description?: string): string => {
|
||||
return '';
|
||||
}
|
||||
|
||||
return description.replace(/<[^>]*>/g, '').trim();
|
||||
const dom = new JSDOM(description);
|
||||
|
||||
return dom.window.document.body.textContent?.trim() ?? '';
|
||||
};
|
||||
|
||||
export const getFirstRowColumnLink = (page: Page) => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user