Révision 3115e37e
Ajouté par Assos Assos il y a plus de 5 ans
drupal7/sites/all/modules/media/modules/media_wysiwyg/includes/media_wysiwyg.filter.inc | ||
---|---|---|
5 | 5 |
* Functions related to the WYSIWYG editor and the media input filter. |
6 | 6 |
*/ |
7 | 7 |
|
8 |
define('MEDIA_WYSIWYG_TOKEN_REGEX', '/\[\[\{.*?"type":"media".+?\}\]\]/s');
|
|
8 |
define('MEDIA_WYSIWYG_TOKEN_REGEX', '/\[\[\{.*?"type":"media".*?\}\]\]/s');
|
|
9 | 9 |
|
10 | 10 |
/** |
11 | 11 |
* Filter callback for media markup filter. |
... | ... | |
140 | 140 |
$match = str_replace("]]", "", $match); |
141 | 141 |
$tag = $match[0]; |
142 | 142 |
|
143 |
// Drupal modules with email support often include site name in the subject line |
|
144 |
// wrapped in brackets. With a token, this is rendered as "[[site:name]]". Such a |
|
145 |
// format will cause a conflict with media_wysiwyg, which is looking for the same. |
|
146 |
if (module_exists('token_filter')) { |
|
147 |
$token_filter = _token_filter_filter_tokens('[' . $tag . ']', '', '', $langcode, NULL, NULL); |
|
148 |
if ($token_filter != '[' . $tag . ']') { |
|
149 |
return '[[' . $tag . ']]'; |
|
150 |
} |
|
151 |
} |
|
152 |
|
|
143 | 153 |
try { |
144 | 154 |
if (!is_string($tag)) { |
145 | 155 |
throw new Exception('Unable to find matching tag'); |
Formats disponibles : Unified diff
Weekly update of contrib modules