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.
Steps to reproduce:
- Go to a Landing Page
- Click "Customize this page"
- Click the plus button in one of the regions
- Click "Add text"
- Set the title to: Here's a title
- Wait for the preview to reload, you'll see the title appear correctly
- Click "Make title a link"
- Wait for the preview to reload
- You'll now see it incorrectly includes an HTML entity: Here#s a title
This only happens in the preview - when rendering the FPP on the page, the title looks fine.
Comment | File | Size | Author |
---|---|---|---|
#12 | panopoly_test-double-encoded-fpp-link-2483295-12.patch | 1.14 KB | dsnopek |
#11 | panopoly_magic-double-encode-fpp-link-2483295-11.patch | 574 bytes | dsnopek |
Comments
Comment #1
dsnopekBlergh. Trying to get the entity rendered right in the summary.
Comment #2
dsnopekSince this is Panopoly Magic, we'll need a test that does the steps above.
Comment #3
humansky CreditAttribution: humansky as a volunteer commentedHere's the behat test that will replicate the issue:
Should this scenario be with the text_widget.feature test? Perhaps wee should consolidate all the related tests together?
Comment #4
humansky CreditAttribution: humansky as a volunteer commentedAdding patch to fix the quote encoding issue with live preview
Comment #5
humansky CreditAttribution: humansky as a volunteer commentedAdding behat test for quotes in title. Eventually we can combine the scenarios into one, but for now, I created a separate scenario.
Comment #6
dsnopekThanks for working on this! :-)
Actually, this shouldn't be in mixed in the text_widget.feature, because that file is meant to be testing only the Text widget.
The functionality that's broken here actually comes from panopoly_magic (I think) and using the Text widget here is just a means to an end. Ideally, actually, panopoly_test would declare it's own simple FPP and we'd use that so that the Text widget (and panopoly_widgets in general) didn't need to be involved - there's an issue for that already:
#2433037: Decouple panopoly_magic tests from panopoly_widgets
Being seperate scenarios is correct!
Marking as "Needs work" to at least move it to somewhere panopoly_magic specific (like maybe livepreview.feature?).
Comment #7
dsnopekI forgot to mention that I ran the test and it worked as it should, so the actual content of it is good!
Comment #8
mglamanReroll of patch to move it to livepreview.feature as #6.
Comment #9
dsnopek@mglaman: Thanks! Did you test that it still works with Behat 3? I don't see any problematic steps, and it'll need to be tested anyway when we try have a fix, but just wondering if you actually ran it.
Comment #10
cboyden CreditAttribution: cboyden commentedI am seeing this problem with ampersands and right/left angle brackets on the rendered page as well. It's not limited to the live preview.
The patch in #4 still applies, with an offset, but it doesn't fix ampersands or right/left angle brackets.
Comment #11
dsnopekStill not sure where the second round of encoding is coming from for links, but this should be
filter_xss_admin()
rather thancheck_plain()
orhtmlentities()
in order to match the output when rendering the FPP.Comment #12
dsnopekHere's a new version of the test patch which includes an ampersand in it per #10. This should fail until we commit #2717509: Update to Fieldable Panels Panes 1.10 for SA-CONTRIB-2016-025.
EDIT: Here's a Travis build: https://travis-ci.org/panopoly/panopoly/builds/127615600
Comment #14
dsnopekCommitted to expedite release! I expect this will pass tests:
https://travis-ci.org/panopoly/panopoly/builds/127874683
But if it doesn't we'll revert and fix.