Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(NcRichText) - don't strip <tag>-like content when parsing markdown #4486

Merged
merged 6 commits into from Sep 14, 2023

Conversation

Antreesy
Copy link
Contributor

@Antreesy Antreesy commented Aug 30, 2023

☑️ Resolves

🖼️ Screenshots

🏚️ Before 🏡 After
commits 71c2cbd, 836b7c8 No visual changes
commit 2e457f3 NcAvatar fix
image image
commit 62fa807 ease HTML fix
image image
commit 22d0c6f Revert old commits, add base styling
image image
commit 38606f2 Escape XML when parsing markdown
image image

🚧 Tasks

  • Code review
  • Visual check
  • Security check

🏁 Checklist

  • ⛑️ Tests are included or are not applicable
  • 📘 Component documentation has been extended, updated or is not applicable

@Antreesy Antreesy self-assigned this Aug 30, 2023
@Antreesy Antreesy force-pushed the fix/3908/handle-special-symbols branch 2 times, most recently from 5523b9d to d2ae39c Compare August 31, 2023 10:11
@Antreesy Antreesy force-pushed the fix/3908/handle-special-symbols branch 3 times, most recently from a50c839 to 34f5c82 Compare August 31, 2023 11:34
@Antreesy Antreesy added bug Something isn't working 3. to review Waiting for reviews feature: documentation Related to the documentation feature: rich-contenteditable Related to the rich-contenteditable components feature: richtext Related to the richtext component backport-request labels Aug 31, 2023
@Antreesy Antreesy added this to the 8.0.0 milestone Aug 31, 2023
@Antreesy Antreesy changed the title fix(NcRichText) - don't strip html tags when parsing markdown fix(NcRichText) - don't strip <tag>-like content when parsing markdown Aug 31, 2023
@Antreesy Antreesy marked this pull request as ready for review August 31, 2023 11:38
@DorraJaouad DorraJaouad self-requested a review August 31, 2023 16:06
Copy link
Contributor

@DorraJaouad DorraJaouad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and it works.
It solves the issue of skipping HTML-like content though there might be a better solution as follow-up .

src/components/NcRichText/NcRichText.vue Outdated Show resolved Hide resolved
@Antreesy Antreesy force-pushed the fix/3908/handle-special-symbols branch from 34f5c82 to 9945cb7 Compare August 31, 2023 16:33
@Antreesy Antreesy removed the feature: documentation Related to the documentation label Sep 6, 2023
@Antreesy Antreesy force-pushed the fix/3908/handle-special-symbols branch 3 times, most recently from 5fa8e8c to 8551e90 Compare September 6, 2023 14:06
@Antreesy
Copy link
Contributor Author

Antreesy commented Sep 6, 2023

Rebased onto master, split commits with documentation to different PR #4507

Copy link
Contributor

@ShGKme ShGKme left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works weird with multiline new lines in quotes

Text Render
image image
image image
image image

src/components/NcRichText/NcRichText.vue Outdated Show resolved Hide resolved
src/components/NcRichText/NcRichText.vue Outdated Show resolved Hide resolved
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
Signed-off-by: Maksim Sukharev <antreesy.web@gmail.com>
@Antreesy Antreesy force-pushed the fix/3908/handle-special-symbols branch from 8551e90 to 38606f2 Compare September 8, 2023 08:46
@Antreesy
Copy link
Contributor Author

Antreesy commented Sep 8, 2023

Rebased onto master with some changes

This returns a behavior, then Markdown parser eats newlines (Enter, Shift+Enter), but it seems to be a default behavior for parsers (see how Github also eats several newlines - edit this comment)

@Antreesy Antreesy requested a review from ShGKme September 8, 2023 08:58
@Antreesy Antreesy merged commit 55aee1a into master Sep 14, 2023
16 checks passed
@Antreesy Antreesy deleted the fix/3908/handle-special-symbols branch September 14, 2023 15:28
@Pytal Pytal mentioned this pull request Sep 15, 2023
@Antreesy Antreesy mentioned this pull request Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews backport-request bug Something isn't working feature: rich-contenteditable Related to the rich-contenteditable components feature: richtext Related to the richtext component
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Markdown rendering "eats" html tags NcRichContenteditable pasting HTML alike content strips off text
4 participants