1
0
mirror of https://github.com/videojs/video.js.git synced 2024-12-23 02:04:34 +02:00

fix(menu-item): update regex from 'containsHexCode' function to not accept characters that could be present issues

This commit is contained in:
cvillasenor 2024-07-11 16:21:35 -06:00
parent a506837ade
commit 493b6bd520

View File

@ -62,5 +62,5 @@ export const titleCaseEquals = function(str1, str2) {
* Whether the string contains a Hex Code * Whether the string contains a Hex Code
*/ */
export const containsHexCode = (string) => { export const containsHexCode = (string) => {
return /\w*(&#x[0-9a-fA-F]{2,4};)\w*/.test(string); return /[a-zA-Z\040]*(&#x[0-9a-fA-F]{2,4};)[a-zA-Z\040]*/.test(string);
}; };