Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
It looks as though when using this module, if you are using the link ability, it is converting characters to their htmlentity code.
Example: In the body if you have "><&<><&"
it would print as "><&<><&"
To Test:
- In a content type display, select "smart trim" as the formatter.
- Select to link the content.
- Save the content display mode.
- Create a piece of content with "><&<><&"
- View the display mode and the content should be escaped properly.
To solve. I believe we just need to add array('html'=>TRUE), to the final link.
Comment | File | Size | Author |
---|---|---|---|
#10 | interdiff.txt | 3.54 KB | anfor |
#10 | smart_trim-7.x-1.x-html-with-content-link-2507161-10.patch | 4.23 KB | anfor |
#6 | smart_trim-7.x-1.5-html-with-content-link-2507161-6.patch | 3.87 KB | anfor |
Comments
Comment #1
timodwhit CreditAttribution: timodwhit commentedComment #2
timodwhit CreditAttribution: timodwhit commentedComment #3
timodwhit CreditAttribution: timodwhit commentedComment #4
timodwhit CreditAttribution: timodwhit commentedComment #5
rymcveighI tested this patch with simplytestme. Works great. Super simple fix that is good to go.
Comment #6
anfor CreditAttribution: anfor commentedSince these characters are detected as HTML tags, isn't better to allow HTML tags using "Tags to preserve" settings ?
See my patch for dev version and stable version as well.
Comment #7
j2r CreditAttribution: j2r commentedAdded patch there for allowing html in more link -> https://www.drupal.org/node/2483401
Comment #8
icampanaI can confirm that patch at #6 solved the issue and didn't cause any trouble
Comment #9
Chris Matthews CreditAttribution: Chris Matthews as a volunteer commentedThe 3 year old patch in #6 to smart_trim.module does not apply to the latest smart_trim 7.x-1.x-dev and needs to be re-rolled.
Comment #10
anfor CreditAttribution: anfor as a volunteer and at Axess Open Web Services commentedPatch rerolled
Comment #11
Chris Matthews CreditAttribution: Chris Matthews as a volunteer commented