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(NcRichContenteditable): do not break adjacent mentions #6223

Merged
merged 2 commits into from
Nov 19, 2024

Conversation

Antreesy
Copy link
Contributor

@Antreesy Antreesy commented Nov 15, 2024

☑️ Resolves

  • when injecting HTML template, newlines, tabs and consecutive whitespaces should be stripped
  • when parsing innerHTML (reverse process), collapsing of whitespacing also affecting two adjacent HTML templates
  • parsed ids without whitespace will be joined and won't be rendered next time

🖼️ Screenshots

🏚️ Before 🏡 After
2024-11-15_23h10_42 2024-11-15_23h10_06

🚧 Tasks

  • ...

🏁 Checklist

  • ⛑️ Tests are included or are not applicable
  • 📘 Component documentation has been extended, updated or is not applicable
  • 3️⃣ Backport to next requested with a Vue 3 upgrade

@Antreesy Antreesy added bug Something isn't working 3. to review Waiting for reviews feature: rich-contenteditable Related to the rich-contenteditable components labels Nov 15, 2024
@Antreesy Antreesy added this to the 8.20.1 milestone Nov 15, 2024
@Antreesy Antreesy self-assigned this Nov 15, 2024
Copy link
Contributor

@susnux susnux left a comment

Choose a reason for hiding this comment

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

Seems to work as far as I tested. But would feel better with (unit) tests.

- when injecting HTML template, newlines, tabs and consecutive whitespaces should be stripped
- when parsing innerHTML (reverse process), collapsing of whitespacing also affecting two adjacent HTML templates
- parsed ids without whitespace will be joined and won't be rendered next time

Signed-off-by: Maksim Sukharev <[email protected]>
- sanitized strings are skipped

Signed-off-by: Maksim Sukharev <[email protected]>
@Antreesy Antreesy force-pushed the fix/noid/strip-off-whitespaces branch from 7733d71 to f62f921 Compare November 19, 2024 16:15
@Antreesy Antreesy merged commit fafcf87 into master Nov 19, 2024
19 checks passed
@Antreesy Antreesy deleted the fix/noid/strip-off-whitespaces branch November 19, 2024 16:29
@Antreesy
Copy link
Contributor Author

/backport to next

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 bug Something isn't working feature: rich-contenteditable Related to the rich-contenteditable components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants