RTE removes quotation marks within wrap syntax

I noticed that the quotation marks within the theme install wrap on Homepage Feature had disappeared after an edit.

I think the RTE caused this. I tried to find a minimal repro:

  1. Paste the following into the composer in markdown mode
[wrap=theme-install-button repo-name="Homepage Feature" repo-url=https://github.com/discourse/discourse-homepage-feature-component]
Install this theme component

[/wrap]

test 
  1. Use the toggle to switch to RTE
  2. Use the toggle again to check whether the quotation marks around “Homepage Feature” are still there. In my testing they were there as expected.
  3. Add official to the draft
[wrap=theme-install-button repo-name="Homepage Feature" repo-url=https://github.com/discourse/discourse-homepage-feature-component]
Install this theme component

[/wrap]

test #official
  1. Toggle to RTE again and toggle back to Markdown mode
    Expected result: The quotation marks are still there.
    Actual result: The quotation marks are missing, which results in users using the button being asked if they want to install “Homepage”.

3 לייקים

I can reproduce, thanks for the steps! @renato this seems like when prosemirror processes the post we’re not accounting for bbcode values with spaces?

3 לייקים

Thank you for the report, this should fix it: FIX: Keep quotes around wrap bbcode attribute values with spaces - Pull Request #41429 - discourse/discourse - GitHub

לייק 1