Skip to content

Commit

Permalink
8.2.10
Browse files Browse the repository at this point in the history
  • Loading branch information
pookmish authored Nov 9, 2020
2 parents 584cf47 + 6d4c7dc commit ae25236
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 2 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Stanford Media

8.x-2.10
--------------------------------------------------------------------------------
_Release Date: 2020-11-06_

- Allow `<a>` tags in embeddable code. (#71) (e58be88)
- Add a check for when the mime type of the image is not known (08af22a)

8.x-2.9
--------------------------------------------------------------------------------
_Release Date: 2020-10-05_
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: 'Media Duplicate Validation'
type: module
description: 'Media Validation plugins to help prevent duplication of media items'
core_version_requirement: ^8.8 || ^9
version: 8.x-2.9
version: 8.x-2.10
package: media
dependencies:
- drupal:media
Original file line number Diff line number Diff line change
Expand Up @@ -241,6 +241,12 @@ protected function mimeType($path) {
*/
protected function createImage($path) {
$mime = $this->mimeType($path);
if (!$mime) {
// Unable to detect the mime type, so lets just build a fake array that
// Will still pass through the switch below.
$mime = [FALSE, FALSE, FALSE];
}

switch ($mime[2]) {
case 'jpg':
return imagecreatefromjpeg($path);
Expand Down
1 change: 1 addition & 0 deletions src/Plugin/Field/FieldFormatter/EmbeddableFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@ protected function viewUnstructuredElements(FieldItemListInterface $items, $lang
'embed',
'script',
'div',
'a',
],
'#prefix' => '<div class="embeddable-content">',
'#suffix' => '</div>',
Expand Down
2 changes: 1 addition & 1 deletion stanford_media.info.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ description: Provides media module configuration and plugins.
core_version_requirement: ^8.8 || ^9
package: media
type: module
version: 8.x-2.9
version: 8.x-2.10
dependencies:
- dropzonejs:dropzonejs
- drupal:breakpoint
Expand Down

0 comments on commit ae25236

Please sign in to comment.