Fix isSafeTagId regex to allow hyphens, matching PerformancePage
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -421,7 +421,7 @@ function handleClick(tagId) {
|
|||||||
* @returns {boolean} True if the tag ID is safe.
|
* @returns {boolean} True if the tag ID is safe.
|
||||||
*/
|
*/
|
||||||
function isSafeTagId(tagId) {
|
function isSafeTagId(tagId) {
|
||||||
const pattern = /^#?[a-zA-Z0-9]*$/;
|
const pattern = /^#?[a-zA-Z0-9-]*$/;
|
||||||
return pattern.test(tagId);
|
return pattern.test(tagId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user