diff --git a/extensions/amp-brid-player/0.1/amp-brid-player.js b/extensions/amp-brid-player/0.1/amp-brid-player.js
index c6074b1e0049..1fa12021de45 100644
--- a/extensions/amp-brid-player/0.1/amp-brid-player.js
+++ b/extensions/amp-brid-player/0.1/amp-brid-player.js
@@ -12,6 +12,7 @@ import {
} from '#core/dom/fullscreen';
import {applyFillContent, isLayoutSizeDefined} from '#core/dom/layout';
import {propagateAttributes} from '#core/dom/propagate-attributes';
+import {childElementsByTag} from '#core/dom/query';
import {htmlFor} from '#core/dom/static-template';
import {PauseHelper} from '#core/dom/video/pause-helper';
@@ -143,10 +144,15 @@ class AmpBridPlayer extends AMP.BaseElement {
'/?amp=1';
// Append child JSON config if supplied
- try {
- const customConfig = getChildJsonConfig(this.element);
- src += '&cust_config=' + JSON.stringify(customConfig);
- } catch (e) {}
+ if (childElementsByTag(this.element, 'script').length) {
+ try {
+ const customConfig = getChildJsonConfig(this.element);
+ src +=
+ '&cust_config=' + encodeURIComponent(JSON.stringify(customConfig));
+ } catch (e) {
+ this.user().warn(TAG, 'Ignoring the
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+