-
Not a real bug, but it proved to be an annoyance until I understood the phenomenon.
If in the shortcode the video height and width is entered manually in px (like: height=”1200px” width=”675px”) and not just the integer (height=”1200″ width=”675″) the shortcode editor drops the information upon edit. The shortcode works even with the values in px, however, interestingly, so I think the editor should only sanitise and not remove the information.
This happened to me after manually creating the shortcode with px after the value and editing the shortcode in the editor sometime afterwards. For speed, I usually edit the shortcodes manually, using the clipboard or typing directly and duplicating existing content for quick replication of settings. I obviously thought the values needed the unit (px) like in CSS and soon I had the size all my videos given in px. I used to think some bad magic was happening to my shortcodes whenever I would find them missing the size information and displaying the video with improper aspect ratio and size (after using the editor).
Before I figured this out, I shot a clip of the disappearing code with my phone, wanting to file a bug report :) – I can send it to you, but I guess you don’t need the demonstration.
Sanitising the values would be great, or if the editor does not support the unit, it should only accept numbers. Nevertheless, I realise this supposes more code.
Thanks!