Page MenuHomePhabricator

Adding <small> tag in a reply using DiscussionTools provides no way to auto-close the tag if one wants their signature to be made the same size
Open, Needs TriagePublicBUG REPORT

Description

Problem: When one adds a <small> tag to a reply using the DiscussionTools extension, there is currently a bug in that the tag is not auto-closed, say, if one wants their signature to be included within the small text size.

Steps to Reproduce:

  1. Create a talk page post
  2. Reply to talk page using the DiscussionTools extension, adding a <small> tag before you type your first word
  3. Do not manually close the </small> tag, allowing DiscussionTools to perform the task
  4. Go back into the edit screen, and note the tag is not auto-closed

Actual Results: <small> tag is not auto-closed, creating problems for subsequent replies or even new threads

Expected Results: <small> tag should be auto-closed, if not closed manually by the authoring user, such as in cases where the signature is to be the same font size as the rest of the post

Examples:

  1. Reply
  2. Manual fix

Event Timeline

dmehus created this task.Nov 10 2020, 5:04 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptNov 10 2020, 5:04 PM
dmehus moved this task from Radar to Miraheze-Linked on the User-RhinosF1 board.Nov 10 2020, 5:04 PM

@RhinosF1 mentioned that I should be able to manually add the four tildes (~~~~) as my signature, which I hadn't initially considered. It's less ideal, as I do feel this shouldn't be too difficult to resolve this bug by having the extension check for an unclosed <small> tag and close any <small> tags present in the reply, but is still an acceptable workaround; however, upon further testing, the four tildes (~~~~) is simply added to the auto-added signature that the extension adds. So, as a secondary or in addition to fix, the extension should check for any four tildes already in the reply and, if present, not add a signature.

This will be fixed by the new indented comment syntax (T230683), which should create a per-comment context from which unbalanced tags can't escape.

One could round-trip the wikitext through Parsoid to ensure balanced syntax, but this is counter to what we have tried to do so far with the wikitext mode, which is that should preserve the wikitext as-typed by the user as much as possible.

@RhinosF1 mentioned that I should be able to manually add the four tildes (~~~~) as my signature, which I hadn't initially considered. It's less ideal, as I do feel this shouldn't be too difficult to resolve this bug by having the extension check for an unclosed <small> tag and close any <small> tags present in the reply, but is still an acceptable workaround; however, upon further testing, the four tildes (~~~~) is simply added to the auto-added signature that the extension adds. So, as a secondary or in addition to fix, the extension should check for any four tildes already in the reply and, if present, not add a signature.

Task T268558 is another request to support this workaround.