Title: dock attribute stripped from amp-brightcove?
Last modified: December 11, 2020

---

# dock attribute stripped from amp-brightcove?

 *  [DrLightman](https://wordpress.org/support/users/drlightman/)
 * (@drlightman)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/dock-attribute-stripped-from/)
 * I have an <amp-brightcove … dock> tag but even with “Video docking enabled” in
   Settings, I can’t make it work.
 * It seems that even before ampforwp_get_setting(‘ampforwp-amp-video-docking’) 
   is tested in features.php around line 8410, the dock attribute has already been
   stripped out, therefore the amp-video-docking component doesn’t get included.
 * Where I can find the spot where the sanitization of the amp-brightcove element
   is performed and the dock attributed removed maybe because considered invalid
   while is not?

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Thread Starter [DrLightman](https://wordpress.org/support/users/drlightman/)
 * (@drlightman)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/dock-attribute-stripped-from/#post-13776099)
 * I think I found the problem, in `\accelerated-mobile-pages\includes\vendor\amp\
   includes\sanitizers\class-amp-allowed-tags-generated.php` you have:
 *     ```
       'dock' => array(
       	'value' => '#dock-slot',
       ),
       ```
   
 * for ‘amp-brightcove’.
 * But this prevents the ability to use only `dock` without any value, that is one
   of the proper ways to use the attribute instead.
 *  Thread Starter [DrLightman](https://wordpress.org/support/users/drlightman/)
 * (@drlightman)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/dock-attribute-stripped-from/#post-13776696)
 * If you could also check on these preg_matches in `\accelerated-mobile-pages\templates\
   features.php`:
 * `if(preg_match('/<amp-brightcove(.*?) dock|dock=">/', $content)){`
 * Something doesn’t seem right to me in the `dock|dock=">` part.
 *  Plugin Author [Ahmed Kaludi](https://wordpress.org/support/users/ahmedkaludi/)
 * (@ahmedkaludi)
 * [5 years, 5 months ago](https://wordpress.org/support/topic/dock-attribute-stripped-from/#post-13779938)
 * Can you please share URL link of your site? We will go through it and let you
   know back.
 *  Thread Starter [DrLightman](https://wordpress.org/support/users/drlightman/)
 * (@drlightman)
 * [5 years, 4 months ago](https://wordpress.org/support/topic/dock-attribute-stripped-from/#post-13782653)
 * Hello, thank you for getting back to me.
 * I prefer not giving the url sorry, also you won’t find anything there becaseu
   I’ve already resolved by applying the modifications I exposed above.
 * The first thing is that the **dock** attribute may be used per specs even without
   any value, whereas in the plugin’s class-amp-allowed-tags-generated.php is configured
   to accept only the _‘#dock-slot’_ value, so it gets always stripped by the sanitificators.
 * The second thing is the preg_match to catch and remove the attribute when one
   disables Video docking from plugin settings | single. It should be something 
   more similar to this: `'/<amp-brightcove(.*?) dock(?:="[^"]*")?>/'`, I think.
 *  Thread Starter [DrLightman](https://wordpress.org/support/users/drlightman/)
 * (@drlightman)
 * [5 years, 3 months ago](https://wordpress.org/support/topic/dock-attribute-stripped-from/#post-13898234)
 * FYI, in version 1.0.74 this bug is still present and I have to tweak the sources
   everytime

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘dock attribute stripped from amp-brightcove?’ is closed to new replies.

 * ![](https://ps.w.org/accelerated-mobile-pages/assets/icon-256x256.png?rev=1693616)
 * [AMP for WP - Accelerated Mobile Pages](https://wordpress.org/plugins/accelerated-mobile-pages/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/accelerated-mobile-pages/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/accelerated-mobile-pages/)
 * [Active Topics](https://wordpress.org/support/plugin/accelerated-mobile-pages/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/accelerated-mobile-pages/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/accelerated-mobile-pages/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [DrLightman](https://wordpress.org/support/users/drlightman/)
 * Last activity: [5 years, 3 months ago](https://wordpress.org/support/topic/dock-attribute-stripped-from/#post-13898234)
 * Status: not resolved