Needs work
Project:
Drupal core
Version:
main
Component:
text.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Jul 2019 at 21:30 UTC
Updated:
2 Jun 2026 at 16:02 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
effulgentsia commentedComment #3
ruuds commentedSee the attached patch which solves this issue for me.
When not using a
<!--break-->, https://www.drupal.org/project/drupal/issues/221257 will still be an issue in some cases.Comment #4
ruuds commentedSorry, that's not correct. Although it solved the issue, text_summary should only return a MarkupInterface when $text is also a MarkupInterface. As stated...
Comment #7
tanubansal commentedTested via below mentioned steps on 9.1
1. Create an Article node. For the Body field, choose the "Full HTML" format, click the "Source" button in the CKEditor toolbar, and enter the following HTML:
stuff below the fold
2. Save that article. Notice that the iframe and the "stuff below the fold" is displayed, because the article is being shown in the "Full" view mode.
3. Go to the home page. Notice that nothing is shown for the article's teaser, not even the iframe.
Same issue can be replicated on drupal 9.1
Can someone provide the patch for 9.1?
Comment #8
ruuds commentedI've retested the patch on 9.1.x, which succeeded. See #4.
Comment #9
tanubansal commentedThanks @Ruuds
After adding a patch, its working fine
RTBC + 1
Comment #11
dsnopekI think this is addressing the same problem as a much older issue:
#2922569: Text trimmed by "Trimmed" or "Summary or trimmed" field formatters will get run through Xss::filter() potentially changing their content
Comment #12
ranjith_kumar_k_u commentedThe last patch works fine,these are the changes
Before patch

After patch

Comment #13
gábor hojtsyWoah, I ran into this same problem in a migration and found this and #2922569: Text trimmed by "Trimmed" or "Summary or trimmed" field formatters will get run through Xss::filter() potentially changing their content. Surprising that so few of us are affected.
Comment #14
phenaproximaAdding to the Bug Smash Initiative because this is clearly a bug that should be smashed. Once security review is done, it'll need tests.
Comment #15
volkswagenchickAdding
NorthAmerica2021tag for visbility.DrupalCon NA is April 12-16 with a focus on EOOTB on Wednesday, April 14.
Thanks
Comment #18
hmendes commentedDid a re-roll of the patch from #4 to the 9.4.x version
Comment #19
quietone commentedThis was the daily random bug a few days ago in #bugsmash. Adding some related issues. And tagging for tests.
Comment #20
quietone commentedComment #24
junaidpvJust a reroll of #18 for current 9.5.x
Comment #26
nitin_lamaPatch #18 working fine for 9.4.x version
Before:

After:

I tried replicating the issue on 9.5.10-dev, 10.1.0-dev, 11.0-dev and it seems like the issue is not existing on these versions, not sure why. I've done the steps mentioned in the IS. I am attaching the ss for reference.
Homepage:

Node page:

Version:

Comment #27
nitin_lamaComment #29
smustgrave commentedTriaging my issue queue and the code in question is still relatively the same, though this is turning into a service helper in #3568387: Move text_summary to TextSummary service and deprecate
Comment #32
sivaji_ganesh_jojodae commentedI’ve created a draft MR for this issue to preserve MarkupInterface when
text_summary()receives safe markup.Comment #33
smustgrave commented@sivaji_ganesh_jojodae same deal as the other ones
This was tagged for tests which were skipped
Also please verify pipeline is passing too before review.
And have to ask did you review the changes or take the last patch for an MR?
Will help with the review process
Thanks
Comment #34
godotislateSince #3568387: Move text_summary to TextSummary service and deprecate is in, this work will need to be done in the new
TextSummary::generate()method that replacestext_summary().Comment #35
junaidpvRe-rolled #24 for 11.3.x