[GH-ISSUE #7] Problem displaying tag in <li> if tag starts with < #6

Closed
opened 2026-10-30 21:16:47 +00:00 by bsakaguchi · 2 comments
Owner

Originally created by @nobodynuf on GitHub (Oct 14, 2022).
Original GitHub issue: https://github.com/DominikDoom/a1111-sd-webui-tagcomplete/issues/7

Originally assigned to: @DominikDoom on GitHub.

Hello,

I was making a custom tags file, and added my embeddings (textual_inversion) as tags in the form "<name_embedded>" to enable autocompletion and stuff.

After editing my target csv file I noticed that the autocomplete function filters correctly but does not show the element in the list (the tag <name_embedded> appeared like '' )

I resolved the issue escaping the < and the > symbols with the html equivalent.

The line I edited
github.com/DominikDoom/a1111-sd-webui-tagcomplete@fbfc988fe5/tagAutocomplete.js (L272)

was replaced with
li.innerHTML = result[0].replace('<','&lt;').replace('>','&gt;');
and the issue is solved.

I mean, I know that the custom script is based on danbooru tags but maybe the scripts need html escaping to avoid those types of issues.

Originally created by @nobodynuf on GitHub (Oct 14, 2022). Original GitHub issue: https://github.com/DominikDoom/a1111-sd-webui-tagcomplete/issues/7 Originally assigned to: @DominikDoom on GitHub. Hello, I was making a custom tags file, and added my embeddings (textual_inversion) as tags in the form "<name_embedded>" to enable autocompletion and stuff. After editing my target csv file I noticed that the autocomplete function filters correctly but does not show the element in the list (the tag <name_embedded> appeared like '' ) I resolved the issue escaping the < and the > symbols with the html equivalent. The line I edited https://github.com/DominikDoom/a1111-sd-webui-tagcomplete/blob/fbfc988fe52904da006f372d89ee576cc4e5bdf0/tagAutocomplete.js#L272 was replaced with ` li.innerHTML = result[0].replace('<','&lt;').replace('>','&gt;'); ` and the issue is solved. I mean, I know that the custom script is based on danbooru tags but maybe the scripts need html escaping to avoid those types of issues.
bsakaguchi 2026-10-30 21:16:47 +00:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@DominikDoom commented on GitHub (Oct 14, 2022):

Good point, I totally didn't think about HTML entities in tags. Will fix later.

<!-- gh-comment-id:1278495790 --> @DominikDoom commented on GitHub (Oct 14, 2022): Good point, I totally didn't think about HTML entities in tags. Will fix later.
Author
Owner

@DominikDoom commented on GitHub (Oct 14, 2022):

Should be solved now! Let me know if it still behaves unexpected for you.

<!-- gh-comment-id:1278612496 --> @DominikDoom commented on GitHub (Oct 14, 2022): Should be solved now! Let me know if it still behaves unexpected for you.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
DominikDoom/a1111-sd-webui-tagcomplete#6
No description provided.