Skip to content

Commit

Permalink
Fixed #278
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonkelly committed Oct 19, 2020
1 parent d975884 commit 9d5dbbb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
@@ -1,5 +1,10 @@
# Release Notes for Redactor for Craft CMS

## Unreleased

### Fixed
- Fixed a bug where protocol-relative YouTube and Vimeo video URLs were getting stripped by HTML Purifier. ([#278](https://github.com/craftcms/redactor/issues/278))

## 2.8.2 - 2020-10-14

### Added
Expand Down
2 changes: 1 addition & 1 deletion src/Field.php
Expand Up @@ -1017,7 +1017,7 @@ private function _getPurifierConfig(): HTMLPurifier_Config
'Attr.EnableID' => true,
'HTML.AllowedComments' => ['pagebreak'],
'HTML.SafeIframe' => true,
'URI.SafeIframeRegexp' => '%^https?://(www.youtube.com/embed/|player.vimeo.com/video/)%',
'URI.SafeIframeRegexp' => '%^(https?:)?//(www.youtube.com/embed/|player.vimeo.com/video/)%',
];

foreach ($config as $option => $value) {
Expand Down

0 comments on commit 9d5dbbb

Please sign in to comment.