quicktext icon indicating copy to clipboard operation
quicktext copied to clipboard

Quicktext v6.3.2 Inserts HTML Replies as Plain Text (Tags Visible)

Open Jacquesvw opened this issue 9 months ago • 9 comments

Description: After updating to Quicktext v6.3.2, HTML replies are no longer rendered properly in Thunderbird. Instead, the raw HTML code (tags and all) is inserted into the message body as plain text.

Steps to Reproduce:

Open Thunderbird 136.0.1. Attempt to insert an HTML Quicktext template into an email. Observe that the HTML is inserted as plain text, showing the HTML tags. Expected Behavior: HTML templates should be rendered correctly in the message body, not displayed as raw code.

Workaround: Reverting back to Quicktext v6.3.0 restores correct HTML rendering.

System Information:

Thunderbird Version: 136.0.1 Operating System: MacOS 15.4 Quicktext Version: 6.3.2

Additional Notes: Plain text templates still appear to work correctly. No error messages are shown when inserting HTML templates.

Jacquesvw avatar Apr 08 '25 05:04 Jacquesvw

I fail to reproduce this on 137.0.1. Hm...

  • Are you sure your composer is an HTML composer?
  • Are you sure your template is set to insert-as-html?

Those are the only ways I could trick QT v6 to inserting the raw source. Still wondering how reverting to 6.3.0 solved it. This is the diff: https://github.com/jobisoft/quicktext/compare/v6.3.0...v6.3.2

Hm.

jobisoft avatar Apr 08 '25 06:04 jobisoft

Thanks for the quick reply.

I updated Thunderbird to 137.0.1 and reinstalled Quicktext v6.3.2, and that seems to have resolved the issue.

Perhaps it was a Thunderbird-specific issue on my side, but everything is working as expected now.

Thanks again.

Jacquesvw avatar Apr 08 '25 07:04 Jacquesvw

I’m reopening this issue, as the problem still occurs intermittently.

I found a temporary workaround: If I cancel the reply, then select another email, and then reselect the original email and try replying again, the Quicktext template will insert correctly.

So while it's not completely broken, something seems to be going wrong in certain reply contexts.

I'll continue trying to find a reliable way to reproduce the issue and will update here if I discover anything useful.

Edit: BTW, the problem is probably not version 6.3.2 specific as I originally suspected.

Jacquesvw avatar Apr 08 '25 13:04 Jacquesvw

As soon as that happens again, please make a screenshot of the compose window.

Important to know is the type of the compose window. Is it an HTML or a TEXT composer? Only an HTML composer will have the formatting toolbar, where you can select the font, bold, italic etc.

jobisoft avatar Apr 14 '25 16:04 jobisoft

I’ve taken a screenshot, see below. Hope this helps.

I'm using the HTML composer, the formatting toolbar is visible (font selection, bold, italic, etc.).

Also, the issue actually occurs more often than not. The workaround I mentioned (canceling the reply, selecting another email, then returning to the original) still works temporarily, but the problem keeps recurring.

Sometimes the workaround doesn't resolve it right away. I need to select multiple other emails, even from different mailboxes, before going back to the original message, at which point it starts working again.

I'm starting to wonder if the issue might be related to how the email message is loaded. Selecting other emails might be forcing a reload of the original message, which then allows Quicktext to work properly.

Image

Jacquesvw avatar Apr 14 '25 16:04 Jacquesvw

Can you describe how to recreate the issue?

All compose windows closed and all you do is to reply to an received message, insert an HTML template (please double check that it is really defined as an HTML template) and it shows up as unreserved html code?

jobisoft avatar Apr 14 '25 16:04 jobisoft

Can you please also give a screenshot of the template config?

Are you using scripts or nested templates in this szenario?

jobisoft avatar Apr 14 '25 16:04 jobisoft

Not using any scripts or nested templates.

Steps to Reproduce

  1. Create a new Quicktext group.

  2. Add a template called "Text" with the content:
    Hi there in plain text

    • Set Insert as: Text
      Image
  3. Add another template called "html" with the content:
    <p>Hi there in html</p>

    • Set Insert as: HTML
      Image
  4. Now try replying to incoming emails using the "html" template:

    • Sometimes the HTML is inserted correctly.
    • Other times, it is inserted as plain text, showing the <p></p> tags literally.

Workaround

The only reliable workaround I’ve found is to cancel the reply, select a different email (sometimes multiple), then return to the original message. After doing this, the HTML sometimes inserts correctly.

This makes me wonder if the issue might be related to how the message or composer is initialized. Forcing Thunderbird to reload or reselect emails appears to reset something internally that allows the insert to work.

Jacquesvw avatar Apr 15 '25 06:04 Jacquesvw

What steps are involved in

Now try replying to incoming emails using the "html" template

  • Is it just clicking on the toolbar button for the html template after the compose window with the reply opened?
  • Is there a timing issue? Does it work if you wait longer before clicking the template button?

Here is a version where I reworked the forceAsText logic to be less complicated. Maybe that fixed it already?

quicktext_6_3_4.zip

Just drag the link into the add-on manager tab of your Thunderbird. I would like to get your feedback, before shipping this to all users of the pre-release.

jobisoft avatar Apr 15 '25 08:04 jobisoft

I had the same issue and 6.3.4 (your zip link) fixed it for me. Thank you!

igorakkerman avatar Apr 16 '25 10:04 igorakkerman

Nice, thanks for the feedback. Could you play around with that version a bit to see if I introduced bugs? It uses a different logic for the force-as-text stuff. If I do not get negative feedback, I can ship it to all pre-release users.

jobisoft avatar Apr 16 '25 10:04 jobisoft

Nice, thanks for the feedback. Could you play around with that version a bit to see if I introduced bugs? It uses a different logic for the force-as-text stuff. If I do not get negative feedback, I can ship it to all pre-release users.

Sorry for the delayed reply. Looks like 6.3.4 fixed the issue for me too. I'll test it further and provide feedback.

Jacquesvw avatar Apr 17 '25 06:04 Jacquesvw

Officially released v6.3.4.

jobisoft avatar Apr 19 '25 22:04 jobisoft

I am having this problem again with 6.3.5 All my <br /> are visible in the pasted text.

sebastianrothe avatar Jun 12 '25 13:06 sebastianrothe

Make sure that the template is configured as an HTML template. Screenshots of the template-management-window and the compose window with pasted content would be helpful. Please open a new issue.

jobisoft avatar Jun 12 '25 13:06 jobisoft

Make sure that the template is configured as an HTML template. Screenshots of the template-management-window and the compose window with pasted content would be helpful. Please open a new issue.

Found the problem, I referenced another template, which was in TEXT form. I changed it all to HTML and now it works.

sebastianrothe avatar Jun 12 '25 13:06 sebastianrothe