Skip to content

Commit

Permalink
release
Browse files Browse the repository at this point in the history
  • Loading branch information
fuze committed Apr 8, 2016
1 parent a20b1e1 commit 1daf9b7
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion system/config/version.ini
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
major = 2
minor = 5
build = 0
date = 20160407
date = 20160408
2 changes: 1 addition & 1 deletion system/controllers/typograph/hooks/html_filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ private function getJevix($is_auto_br){
$jevix->cfgAllowTagParams('object', array('width' => '#int', 'height' => '#int', 'data' => array('#domain'=>array('youtube.com','rutube.ru','vimeo.com','vk.com')), 'type' => '#text'));
$jevix->cfgAllowTagParams('param', array('name' => '#text', 'value' => '#text'));
$jevix->cfgAllowTagParams('embed', array('src' => array('#domain'=>array('youtube.com','rutube.ru','vimeo.com','vk.com')), 'type' => '#text','allowscriptaccess' => '#text', 'allowfullscreen' => '#text','width' => '#int', 'height' => '#int', 'flashvars'=> '#text', 'wmode'=> '#text'));
$jevix->cfgAllowTagParams('iframe', array('width' => '#int', 'height' => '#int', 'style' => '#text', 'frameborder' => '#int', 'allowfullscreen' => '#text', 'src' => array('#domain'=>array('youtube.com','rutube.ru','vimeo.com','vk.com','my.mail.ru'))));
$jevix->cfgAllowTagParams('iframe', array('width' => '#int', 'height' => '#int', 'style' => '#text', 'frameborder' => '#int', 'allowfullscreen' => '#text', 'src' => array('#domain'=>array('youtube.com','rutube.ru','vimeo.com','vk.com','my.mail.ru','facebook.com'))));
$jevix->cfgAllowTagParams('table', array('width' => '#int', 'height' => '#int', 'cellpadding' => '#int', 'cellspacing' => '#int', 'border' => '#int', 'style' => '#text', 'align'=>'#text', 'valign'=>'#text'));
$jevix->cfgAllowTagParams('td', array('width' => '#int', 'height' => '#int', 'style' => '#text', 'align'=>'#text', 'valign'=>'#text', 'colspan'=>'#int', 'rowspan'=>'#int'));
$jevix->cfgAllowTagParams('th', array('width' => '#int', 'height' => '#int', 'style' => '#text', 'align'=>'#text', 'valign'=>'#text', 'colspan'=>'#int', 'rowspan'=>'#int'));
Expand Down
8 changes: 6 additions & 2 deletions wysiwyg/redactor/js/video.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
return {
reUrlYoutube: /https?:\/\/(?:[0-9A-Z-]+\.)?(?:youtu\.be\/|youtube\.com\S*[^\w\-\s])([\w\-]{11})(?=[^\w\-]|$)(?![?=&+%\w.-]*(?:['"][^<>]*>|<\/a>))[?=&+%\w.-]*/ig,
reUrlVimeo: /https?:\/\/(www\.)?vimeo.com\/(\d+)($|\/)/,
reUrlFacebook: /https?:\/\/(?:www\.)?(?:facebook\.com(?:\/[^/\/]+\/videos\/|\/video.php\?v=))([0-9]+)(?:.+)?/,
getTemplate: function()
{
return String()
Expand Down Expand Up @@ -37,12 +38,11 @@
insert: function()
{
var data = $('#redactor-insert-video-area').val();

if (!data.match(/<iframe|<video/gi))
{
data = this.clean.stripTags(data);

// parse if it is link on youtube & vimeo
// parse if it is link on youtube, vimeo, FB
var iframeStart = '<iframe style="width: 500px; height: 281px;" src="',
iframeEnd = '" frameborder="0" allowfullscreen></iframe>';

Expand All @@ -54,6 +54,10 @@
{
data = data.replace(this.video.reUrlVimeo, iframeStart + '//player.vimeo.com/video/$2' + iframeEnd);
}
else if (data.match(this.video.reUrlFacebook))
{
data = data.replace(this.video.reUrlFacebook, iframeStart + 'https://www.facebook.com/video/embed?video_id=$1' + iframeEnd);
}
}

this.selection.restore();
Expand Down
1 change: 1 addition & 0 deletions wysiwyg/redactor/wysiwyg.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public function displayEditor($field_id, $content=''){
minHeight: 190,
replaceDivs: false,
removeComments: true,
convertLinks: false,
//linkNofollow: true,
<?php if ($user->is_admin) { ?>
buttonSource: true
Expand Down

0 comments on commit 1daf9b7

Please sign in to comment.