Skip to content

Basic local AI Token management tools #2062

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

grmartin
Copy link

@grmartin grmartin commented Jun 8, 2025

Adding the following:

  • Category: AI
    • "Count AI Tokens"
    • "Parse AI Tokens"

@CLAassistant
Copy link

CLAassistant commented Jun 8, 2025

CLA assistant check
All committers have signed the CLA.

Comment on lines +136 to +144
return htmlString
.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/ig, "")
.replace(/(<[^>]*?>)|(\s+)/g, function(match, tag, spaces) {
if (tag) {
return tag;
} else if (spaces) {
return "";
}
})

Check failure

Code scanning / CodeQL

Incomplete multi-character sanitization High

This string may still contain
<script
, which may cause an HTML element injection vulnerability.
Comment on lines +136 to +137
return htmlString
.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/ig, "")

Check failure

Code scanning / CodeQL

Incomplete multi-character sanitization High

This string may still contain
<script
, which may cause an HTML element injection vulnerability.
*/
replaceSpacesOutsideTags(htmlString) {
return htmlString
.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/ig, "")

Check failure

Code scanning / CodeQL

Bad HTML filtering regexp High

This regular expression does not match script end tags like </script >.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants