support icon indicating copy to clipboard operation
support copied to clipboard

[Edit] "Remove Tags" function does not work

Open Korb opened this issue 1 year ago • 5 comments

When I select a piece of HTML code that includes tags and select "Remove Tags" from the context menu, I expect the text to be cleared of all tags. However, no changes occur and all tags remain unchanged.

Mozilla Firefox 127.0b7 (64-bit) Edit 1.9 (January 17, 2023) Microsoft Windows 10.0.19045.4412

Korb avatar May 29 '24 17:05 Korb

Can you provide an example that can be tested?

erosman avatar May 29 '24 19:05 erosman

<h2 class="sr-only">Navigation Menu</h2>
    <div class="AppHeader-globalBar pb-2 js-global-bar">
      <div class="AppHeader-globalBar-start">
          <deferred-side-panel data-url="/_side-panels/global">
  <include-fragment data-target="deferred-side-panel.fragment">
      <button aria-label="Open global navigation menu" data-action="click:deferred-side-panel#loadPanel click:deferred-side-panel#panelOpened" data-show-dialog-id="dialog-e63becb2-98ca-44b2-b203-b22169082d7a" id="dialog-show-dialog-e63becb2-98ca-44b2-b203-b22169082d7a" type="button" data-view-component="true" class="Button Button--iconOnly Button--secondary Button--medium AppHeader-button color-bg-transparent p-0 color-fg-muted">  <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-three-bars Button-visual">
    <path d="M1 2.75A.75.75 0 0 1 1.75 2h12.5a.75.75 0 0 1 0 1.5H1.75A.75.75 0 0 1 1 2.75Zm0 5A.75.75 0 0 1 1.75 7h12.5a.75.75 0 0 1 0 1.5H1.75A.75.75 0 0 1 1 7.75ZM1.75 12h12.5a.75.75 0 0 1 0 1.5H1.75a.75.75 0 0 1 0-1.5Z"></path>
</svg>
</button>

This code remains unchanged after selecting it in the input field and applying the "Remove Tags" command.

Expected behavior: Only the following text remains:

Navigation Menu

Korb avatar May 30 '24 10:05 Korb

Remove Tags is set to remove the following tags: b, i, u, del, ul, li, table, tr, td, img, code, url, blockquote, quote, list, color, size

I can look into a more general tag removal when I work on the next update of the extension.

erosman avatar May 30 '24 13:05 erosman

If this ticket stopped being a bug report and became a feature request, perhaps it should have been renamed.

I would appreciate it if there was a tooltip in the UI with a list of tags that this function can remove. Also, I'm looking forward to this feature being able to remove the following tags:

a, blockquote, br, button, div, em, figcaption, figure, h1, h2 (...), iframe, nav, ol, p, path , section, strong, span

Or at least their parameters.

Korb avatar May 30 '24 13:05 Korb

Remove Tag was initially set to remove the tags that are added by the Edit itself.

If this ticket stopped being a bug report and became a feature request, perhaps it should have been renamed.

It doesn't matter. I will read all open issues when working on an update.

erosman avatar May 30 '24 14:05 erosman