Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Commit

Permalink
Convert the "rel" attribute inserted by TinyMCE to a "data-lightbox" …
Browse files Browse the repository at this point in the history
…attribute (see #4073)
  • Loading branch information
leofeyer committed Mar 26, 2012
1 parent 5e92113 commit cc33fa1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -4,6 +4,10 @@ Contao Open Source CMS Changelog
Version 2.11.3 (XXXX-XX-XX)
---------------------------

### Fixed
Convert the "rel" attribute inserted by TinyMCE to a "data-lightbox" attribute
if it is an HTML5 page (see #4073).

### Fixed
Uploaded files should now be resized correctly (see #3806).

Expand Down
5 changes: 3 additions & 2 deletions system/libraries/String.php
Expand Up @@ -416,8 +416,9 @@ public function toHtml5($strString)
{
$arrPregReplace = array
(
'/<(br|hr|img)([^>]*) \/>/i' => '<$1$2>', // Close stand-alone tags
'/ (cellpadding|cellspacing|border)="[^"]*"/' => '' // Remove deprecated attributes
'/<(br|hr|img)([^>]*) \/>/i' => '<$1$2>', // Close stand-alone tags
'/ (cellpadding|cellspacing|border)="[^"]*"/' => '', // Remove deprecated attributes
'/ rel="lightbox(\[([^\]]+)\])?"/' => ' data-lightbox="$2"' // see #4073
);

$arrStrReplace = array
Expand Down

1 comment on commit cc33fa1

@ways2web
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

darf ich mal fragen, warum es diese lösung es nie in eine neue Version geschafft hat? in 2.11.5 besteht ja das problem noch immer oder hat mein update nicht richtig funktioniert?

Please sign in to comment.