Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
Encoding error when updating from shortcode 7.x 2.23 to shortcode 7.x 2.25.
Previously working two column style, still creates two columns but the contents aren't encoded properly - the html is displaying.
Please see screen shots for examples of the displays before and after and resulting html.
Drupal info:
Drupal 7.56
Database system: MySQL, MariaDB, or equivalent
Database system version: 10.1.30-MariaDB
Comment | File | Size | Author |
---|---|---|---|
#10 | Screen Shot 2018-04-10 at 11.00.32.png | 18.49 KB | Vali Hutchison |
#9 | short-code-fix-check-plan-2.patch | 566 bytes | joaogarin |
#7 | short-code-fix-check-plan.patch | 580 bytes | joaogarin |
#2 | output_shortcode.png | 9.6 KB | shivam.addweb |
#2 | shortcode_html.png | 30.21 KB | shivam.addweb |
Comments
Comment #2
shivam.addweb CreditAttribution: shivam.addweb at AddWeb Solution Pvt. Ltd. commentedThis is working fine on my side. I used module version 7.x-2.25 and Drupal version 7.56. Make sure you enable all settings related to the shortcode in text format settings. config/content/formats/full_html.
PFA screenshot.
Comment #3
Denes.Szabo CreditAttribution: Denes.Szabo as a volunteer commented@lorren can you give us the source you used in the textarea? I see there few unnecessary quotation marks…
Comment #4
Denes.Szabo CreditAttribution: Denes.Szabo as a volunteer commentedComment #5
saramato CreditAttribution: saramato commentedAfter upgrading version 7. x-2.2 to 7. x-2.6, for example tag [item] doesn't work (the html format is configured correctly)
Drupal displays htm code instead of contents. 7.x-2.3 work correctly
I did not test other versions
Comment #6
joaogarin CreditAttribution: joaogarin at jobiqo - job board technology commentedHello,
I have now also upgrade to the version 2.2.6 and am getting the same behaviour mentioned by @saramato. Still trying to figure out how to get it back working. Any help would be appreciated.
As far as I can tell the problem is with the [item] tag.
Can definitely confirm the behaviour describe in the issue.
I cant however go back to 2.2.3 because I am in PHP7
Comment #7
joaogarin CreditAttribution: joaogarin at jobiqo - job board technology commentedHere is a patch that fixes the issue :
Its using check_plain in $vars['text'] when in fact this often includes html.I still suspect there might be more places where it happens though
Comment #8
joaogarin CreditAttribution: joaogarin at jobiqo - job board technology commentedComment #9
joaogarin CreditAttribution: joaogarin at jobiqo - job board technology commentedActually, I think the [item] shouldn't even do any check since it contains html inside? Unless we are actually able to know the format being used..
so it would need something like :
but I don't think at render we have access to $format? Would leave this to the maintainers.
Comment #10
Vali Hutchison CreditAttribution: Vali Hutchison commentedI had a similar issue using the video embed shortcode with some HTMl output under the video. When I moved the 'Convert URLs into links' filter in the 'Filter processing order' section to be under the Shortcodes filter then this fixed the issue. See attached screenshot of my filtering order.
Comment #12
Denes.Szabo CreditAttribution: Denes.Szabo as a volunteer commented@joaogarin You was right, the item macro can contain another HTML, the check_plain() was wrong there. THX!
The check_markup($text, $format') is the way how the ShortCode process the text, so this will filter out tags, we do not need to call it.
Comment #13
Denes.Szabo CreditAttribution: Denes.Szabo as a volunteer commented