Skip to content

Commit

Permalink
Set default values for allowed html and iframesi #1056
Browse files Browse the repository at this point in the history
This avoids errors if upgraders don't update config.php

Conflicts:

	application/i18n
  • Loading branch information
rjmackay committed May 1, 2013
1 parent 71da421 commit 3b3a07d
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions application/hooks/2_settings.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,3 +76,15 @@
{
Kohana::config_set('config.external_site_protocol', 'https');
}

// Default for allowed_html in case upgraders don't add it to config.php
if ( ! Kohana::config('config.allowed_html') )
{
Kohana::config_set('config.allowed_html', 'a[href|title],p,img[src|alt],br,b,u,strong,em,i');
}
// Default for allowed iframe regexp, in case upgraders don't add it to config.php
if ( ! Kohana::config('config.allowed_iframe_regexp') )
{
Kohana::config_set('config.allowed_iframe_regexp', '%^http://(www.youtube.com/embed/|player.vimeo.com/video/|w.soundcloud.com/player)%');
}

0 comments on commit 3b3a07d

Please sign in to comment.