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

Add TextFormatter support (attempt 2) #48

Merged
merged 11 commits into from Jun 25, 2023
Merged

Conversation

dsevillamartin
Copy link
Member

Fixes #37
Fixes #38
Supersedes #42

Changes proposed in this pull request:

  • Trim unparsed bio before saving to DB (content provided by user)
  • Use toned-down TextFormatter instance (with markdown and/or bbcode if those extensions are enabled)
    • No images, iframes, or embeds. This formatter isn't extended through Flarum's Formatter extender, so shouldn't be issues with other exts accidentally adding stuff
  • Do not raise BioChanged event if bio did not change\

Reviewers should focus on:

  • I think its fine to reuse the storage/formatter folder as the class files are different.
  • The highlight.js code doesn't run and I don't know why nor really care 🤷

Screenshot
image
image

Confirmed

  • Frontend changes: tested on a local Flarum installation.
  • Backend changes: tests are green (run composer test).

@dsevillamartin dsevillamartin merged commit e1633a4 into master Jun 25, 2023
4 checks passed
@dsevillamartin
Copy link
Member Author

image

@dsevillamartin dsevillamartin deleted the ds/37-formatter-again branch June 25, 2023 23:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Save and event gets triggered for changing null to empty string formatting support
2 participants