Unconventional Youtube iframe src causes simple_amp module to break with video_filter

Created on 30 January 2018, almost 7 years ago
Updated 15 February 2023, almost 2 years ago

When a video filter code is included in a node, the simple_amp module does substitution on the resulting Youtube video code. Unfortunately it seems the code is concatenating URL query parameters with the HTML "&" which greatly confuses the simple_amp module's plugin.

DOMException: Invalid Character Error in DOMElement->setAttribute() (line 509 of .../vendor/querypath/querypath/src/QueryPath/DOMQuery.php).
QueryPath\DOMQuery->attr('data-param-amp;html5', '1') (Line: 174)

I propose we just implode with the regular ampersand character instead of "&". I don't think this would be a security issue, but would want some review.

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.71.5 2024