MediaWiki:Common.js: различия между версиями
установка стилей через отдельные свойства |
м усилим валидацию по мелочи |
||
| Строка 87: | Строка 87: | ||
if (height > 2000) height = 2000; | if (height > 2000) height = 2000; | ||
if (oid && id && oid !== 'null' && id !== 'null' && /^[ | if (oid && id && oid !== 'null' && id !== 'null' && /^[a-zA-Z0-9_-]{1,100}$/.test(oid) && /^[-_a-zA-Z0-9]+$/.test(id)) { | ||
var iframe = document.createElement('iframe'); | var iframe = document.createElement('iframe'); | ||
iframe.src = 'https://vk.com/video_ext.php?oid=' + encodeURIComponent(oid) + '&id=' + encodeURIComponent(id); | iframe.src = 'https://vk.com/video_ext.php?oid=' + encodeURIComponent(oid) + '&id=' + encodeURIComponent(id); | ||