Windows 10 reached EOS (end of support) on October 14, 2025. For more information, see this article.

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More

How to remove the "<selection>" tag from the selected text when using the AI chatbot custom prompt in the about:config?

  • No replies
  • 0 have this problem
  • 23 views
more options

You can create custom prompts in about:config (search for browser.ml.chat.prompt), so you can use something like {"label":"Custom prompt","value":"%selection%"}. This %selection% is the text on the page that is currently selected. When you select something and click the chatbot popup button that appears and choose your custom prompt, it sends to the chatbot the string "<selection>the selected text</selection>". So instead of just returning the actual text, it adds the <selection> tag around it.

There are two problems with this: 1. it's ugly, and 2. the chatbot doesn't ignore it, sometimes changing the response because of the "<selected>" tag.

How to remove this tag so that what is sent is only the "the selected text" string with no tag?

You can create custom prompts in about:config (search for browser.ml.chat.prompt), so you can use something like {"label":"Custom prompt","value":"%selection%"}. This %selection% is the text on the page that is currently selected. When you select something and click the chatbot popup button that appears and choose your custom prompt, it sends to the chatbot the string "<selection>the selected text</selection>". So instead of just returning the actual text, it adds the <selection> tag around it. There are two problems with this: 1. it's ugly, and 2. the chatbot doesn't ignore it, sometimes changing the response because of the "<selected>" tag. How to remove this tag so that what is sent is only the "the selected text" string with no tag?

You must log in to your account to reply to posts. Please start a new question, if you do not have an account yet.