-
Notifications
You must be signed in to change notification settings - Fork 39
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
Filtered / Basic HTML format should disable filter_autop #6429
Comments
Neither me, honestly. 😉 FTR: the first thing I always turn off when configuring filters for a new project, are exactly these two. I'm voting for disabling |
Removes the redundant and problematic filter_url and filter_autop from default formats that have the Text Editor enabled. (Only the Basic format.) backdrop/backdrop-issues#6429
@leeksoup many thanks for providing this pull request! 🙏 However, there's a little TODO left. One test (ViewsHandlerAreaTextTest) fails in all three PHP versions. It seems that this test relies on the filter being on. Probably unrelated, but still the test needs some update. |
@indigoxela you're welcome. :) Thanks for the explanation. I saw that some tests failed but had no idea what to do with that information. |
They need fixing. 😉 Two tests have failures, both because of expected
The xpath search fails, as it currently seeks for the paragraph inside the div.
The test actually compares the output of different filters, check_markup() uses the fallback format by default, but the test should actually correctly compare with the same format applied - default_format(). @leeksoup this issue turns out to be a bit more of a deep-dive into our testing framework for you. 😉 |
I should have guessed that. 😏
No, I have no familiarity with those. Yes, more than I expected for sure. I don't think I can invest the time right now to figure it out and fix them. Sorry. 😢 |
That's OK, I already suspected, that this might be a little over the top. 😉 Still, many thanks for starting this topic by opening an issue. 👍 |
Description of the need
The "Convert line breaks into HTML" / filter_autop filter breaks text_summary() when combined with CKEditor. See #6423
It is also redundant in an Editor configuration, as is "Convert URLs into links."
Idk whether to consider this a bug report or a feature request, honestly.
Proposed solution
Disable the following filters in the default Filtered HTML and Full HTML configurations:
<br>
and<p>
)Alternatives that have been considered
Each site owner who uses trimmed / auto-generated summary with text_summary() can disable these filters.
Additional information
Edit: I picked out the format names from the documentation at https://docs.backdropcms.org/documentation/text-formats-editors-filters but it appears that that is out of date and needs to be updated wrt format names and settings. I will update issue backdrop-ops/docs.backdropcms.org#233 accordingly.
Draft of feature description for Press Release (1 paragraph at most)
Backdrop now disables redundant filters in the default Editor configurations.
The text was updated successfully, but these errors were encountered: