Skip to content

Commit

Permalink
0.1.10
Browse files Browse the repository at this point in the history
  • Loading branch information
martec committed Jul 15, 2017
1 parent 4a1a43f commit d8d7ae3
Show file tree
Hide file tree
Showing 14 changed files with 300 additions and 311 deletions.
4 changes: 2 additions & 2 deletions rin/editor/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
"type": "phpbb-extension",
"description": "Rin Editor for phpBB",
"homepage": "https://github.com/martec/Rin-Editor_for_phpBB",
"version": "0.1.9",
"time": "2017-07-15",
"version": "0.1.10",
"time": "2017-07-16",
"license": "GPL-2.0",
"authors": [
{
Expand Down
15 changes: 2 additions & 13 deletions rin/editor/event/main_listener.php
Original file line number Diff line number Diff line change
Expand Up @@ -103,19 +103,8 @@ public function rce_rmv_ignws($event)

public function rce_parse_change($event)
{
$patterns = array('/<\/blockquote><br>/', '/<\/div><br>/', '/<\/address><br>/', '/<\/article><br>/', '/<\/aside><br>/', '/<\/canvas><br>/',
'/<\/dd><br>/', '/<\/dl><br>/', '/<\/dt><br>/', '/<\/fieldset><br>/', '/<\/figcaption><br>/', '/<\/figure><br>/', '/<\/footer><br>/',
'/<\/form><br>/', '/<\/h1><br>/', '/<\/h2><br>/', '/<\/h3><br>/', '/<\/h4><br>/', '/<\/h5><br>/', '/<\/h6><br>/', '/<\/header><br>/',
'/<\/hgroup><br>/', '/<\/hr><br>/', '/<\/li><br>/', '/<\/main><br>/', '/<\/nav><br>/', '/<\/noscript><br>/', '/<\/ol><br>/', '/<\/output><br>/',
'/<\/p><br>/', '/<\/pre><br>/', '/<\/section><br>/', '/<\/table><br>/', '/<\/tfoot><br>/', '/<\/ul><br>/', '/<\/video><br>/');

$replacements = array('</blockquote>', '</div>', '</address>', '</article>', '</aside>', '</canvas>',
'</dd>', '</dl>', '</dt>', '</fieldset>', '</figcaption>', '</figure>', '</footer>',
'</form>', '</h1>', '</h2>', '</h3>', '</h4>', '</h5>', '</h6>', '</header>',
'</hgroup>', '</hr>', '</li>', '</main>', '</nav>', '</noscript>', '</ol>', '</output>',
'</p>', '</pre>', '</section>', '</table>', '</tfoot>', '</ul>', '</video>');

$event['html'] = preg_replace($patterns, $replacements, $event['html']);
$event['html'] = preg_replace("#(</?(?:html|address|article|aside|canvas|dd|dl|dt|fieldset|figcaption|figure|footer|h1|h2|h3|h4|h5|h6|header|hgroup|main|nav|noscript|output|pre|section|video|head|body|div|p|form|table|thead|tbody|tfoot|tr|td|th|ul|ol|li|div|p|blockquote|cite|hr)[^>]*>)\s*<br>#i", "$1", $event['html']);
$event['html'] = preg_replace("#(&nbsp;)+(</?(?:html|address|article|aside|canvas|dd|dl|dt|fieldset|figcaption|figure|footer|h1|h2|h3|h4|h5|h6|header|hgroup|main|nav|noscript|output|pre|section|video|head|body|div|p|form|table|thead|tbody|tfoot|tr|td|th|ul|ol|li|div|p|blockquote|cite|hr)[^>]*>)#i", "$2", $event['html']);
}

public function rce_get($key)
Expand Down
570 changes: 285 additions & 285 deletions rin/editor/styles/all/template/js/ckeditor.js

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

0 comments on commit d8d7ae3

Please sign in to comment.