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.
I have created a taglist thats works as I need it to. However, if I check the 'HTML attributes (attributes)' checkbox and add the content class='embedded-content'
into the textfield provided, the wysiwyg integration breaks. Clicking the button brings up the p[popup window as normal, but clicking on the names of one of my views to insert the embedded view, doesn't work. Instead, there is a javascript error:
Uncaught SyntaxError: Unexpected identifier
Comment | File | Size | Author |
---|---|---|---|
#3 | 997800-linodef-html-encode-attributes.patch | 931 bytes | mrfelton |
#2 | 997800-linodef-html-encode-attributes.patch | 805 bytes | mrfelton |
Comments
Comment #1
mrfelton CreditAttribution: mrfelton commentedChanging
class='embedded-content'
toclass="embedded-content"
(using double quotes instead) gets it working again, but then you end up with a broken tag. e.g.[#related_content,type="view",nolink,attributes="class="embedded-content"",visibility="full",display="block_1"]
Comment #2
mrfelton CreditAttribution: mrfelton commentedThe attached patch resolves by html encoding the attributes.
Comment #3
mrfelton CreditAttribution: mrfelton commentedAttached patch works slightly better, only encoding the string version. This ensures that when the array is themes as an item list (in the popup help text) there is no double encoding.