diff --git a/t3lib/class.t3lib_parsehtml_proc.php b/t3lib/class.t3lib_parsehtml_proc.php index 2843f93c08befb83d2d63777001b9b703433755b..8046c1cdabf1176e4b9d624bcd158dbb78231a53 100644 --- a/t3lib/class.t3lib_parsehtml_proc.php +++ b/t3lib/class.t3lib_parsehtml_proc.php @@ -567,7 +567,7 @@ class t3lib_parsehtml_proc extends t3lib_parsehtml { unset($attribArray_copy['target']); unset($attribArray_copy['class']); unset($attribArray_copy['title']); - unset($attribArray_copy['external']); + unset($attribArray_copy['data-htmlarea-external']); if ($attribArray_copy['rteerror']) { // Unset "rteerror" and "style" attributes if "rteerror" is set! unset($attribArray_copy['style']); unset($attribArray_copy['rteerror']); @@ -590,8 +590,8 @@ class t3lib_parsehtml_proc extends t3lib_parsehtml { $attribArray['class'] = preg_match('/ /', $attribArray['class']) ? '"' . $attribArray['class'] . '"' : $attribArray['class']; $attribArray['title'] = preg_match('/ /', $attribArray['title']) ? '"' . $attribArray['title'] . '"' : $attribArray['title']; // Creating the TYPO3 pseudo-tag "<LINK>" for the link (includes href/url, target and class attributes): - // If external attribute is set, keep the href unchanged - $href = $attribArray['external'] ? $attribArray['href'] : $info['url'] . ($info['query'] ? ',0,' . $info['query'] : ''); + // If data-htmlarea-external attribute is set, keep the href unchanged + $href = $attribArray['data-htmlarea-external'] ? $attribArray['href'] : $info['url'] . ($info['query'] ? ',0,' . $info['query'] : ''); $bTag = '<link ' . $href . ($attribArray['target'] ? ' ' . $attribArray['target'] : (($attribArray['class'] || $attribArray['title']) ? ' -' : '')) . ($attribArray['class'] ? ' ' . $attribArray['class'] : ($attribArray['title'] ? ' -' : '')) . ($attribArray['title'] ? ' ' . $attribArray['title'] : '') . '>'; $eTag = '</link>'; @@ -613,14 +613,14 @@ class t3lib_parsehtml_proc extends t3lib_parsehtml { } else { // ... otherwise store the link as a-tag. // Unsetting 'rtekeep' attribute if that had been set. unset($attribArray['rtekeep']); - if (!$attribArray['external']) { + if (!$attribArray['data-htmlarea-external']) { // If the url is local, remove url-prefix $siteURL = $this->siteUrl(); if ($siteURL && substr($attribArray['href'], 0, strlen($siteURL)) == $siteURL) { $attribArray['href'] = $this->relBackPath . substr($attribArray['href'], strlen($siteURL)); } } - unset($attribArray['external']); + unset($attribArray['data-htmlarea-external']); $bTag = '<a ' . t3lib_div::implodeAttributes($attribArray, 1) . '>'; $eTag = '</a>'; $blockSplit[$k] = $bTag . $this->TS_links_db($this->removeFirstAndLastTag($blockSplit[$k])) . $eTag; @@ -709,7 +709,7 @@ class t3lib_parsehtml_proc extends t3lib_parsehtml { ($tagCode[2] && $tagCode[2] != '-' ? ' target="' . htmlspecialchars($tagCode[2]) . '"' : '') . ($tagCode[3] && $tagCode[3] != '-' ? ' class="' . htmlspecialchars($tagCode[3]) . '"' : '') . ($tagCode[4] ? ' title="' . htmlspecialchars($tagCode[4]) . '"' : '') . - ($external ? ' external="1"' : '') . + ($external ? ' data-htmlarea-external="1"' : '') . ($error ? ' rteerror="' . htmlspecialchars($error) . '" style="background-color: yellow; border:2px red solid; color: black;"' : '') . // Should be OK to add the style; the transformation back to databsae will remove it... '>'; $eTag = '</a>'; @@ -1632,7 +1632,7 @@ class t3lib_parsehtml_proc extends t3lib_parsehtml { if (!$uP['scheme']) { $attribArray['href'] = $this->siteUrl() . substr($attribArray['href'], strlen($this->relBackPath)); } elseif ($uP['scheme'] != 'mailto') { - $attribArray['external'] = 1; + $attribArray['data-htmlarea-external'] = 1; } } else { $attribArray['rtekeep'] = 1; diff --git a/typo3/sysext/rtehtmlarea/extensions/TYPO3Link/class.tx_rtehtmlarea_typo3link.php b/typo3/sysext/rtehtmlarea/extensions/TYPO3Link/class.tx_rtehtmlarea_typo3link.php index 091e6100931fdf3c1474b257bd3a26a3c90de015..5b8a2522ec603094823f8997fc2a2e17671b22e6 100644 --- a/typo3/sysext/rtehtmlarea/extensions/TYPO3Link/class.tx_rtehtmlarea_typo3link.php +++ b/typo3/sysext/rtehtmlarea/extensions/TYPO3Link/class.tx_rtehtmlarea_typo3link.php @@ -104,7 +104,7 @@ class tx_rtehtmlarea_typo3link extends tx_rtehtmlarea_api { RTEarea['.$RTEcounter.'].buttons.'. $button .'.classesAnchorUrl = "' . $this->htmlAreaRTE->writeTemporaryFile('', 'classesAnchor_'.$this->htmlAreaRTE->contentLanguageUid, 'js', $this->buildJSClassesAnchorArray(), TRUE) . '";'; } $registerRTEinJavascriptString .= ' - RTEarea['.$RTEcounter.'].buttons.'. $button .'.additionalAttributes = "external' . ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->extensionKey]['plugins'][$this->pluginName]['additionalAttributes'] ? (',' . $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->extensionKey]['plugins'][$this->pluginName]['additionalAttributes']) : '') . '";'; + RTEarea['.$RTEcounter.'].buttons.'. $button .'.additionalAttributes = "data-htmlarea-external' . ($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->extensionKey]['plugins'][$this->pluginName]['additionalAttributes'] ? (',' . $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][$this->extensionKey]['plugins'][$this->pluginName]['additionalAttributes']) : '') . '";'; } return $registerRTEinJavascriptString; } diff --git a/typo3/sysext/rtehtmlarea/mod3/class.tx_rtehtmlarea_browse_links.php b/typo3/sysext/rtehtmlarea/mod3/class.tx_rtehtmlarea_browse_links.php index ae1ec4bee91606eb4585adeb7260705b7f7bb0a9..41200be81afcca4959b0456b3957556aaa926b11 100644 --- a/typo3/sysext/rtehtmlarea/mod3/class.tx_rtehtmlarea_browse_links.php +++ b/typo3/sysext/rtehtmlarea/mod3/class.tx_rtehtmlarea_browse_links.php @@ -249,7 +249,7 @@ class tx_rtehtmlarea_browse_links extends browse_links { } // Note: parseCurUrl will invoke the hooks $this->curUrlInfo = $this->parseCurUrl($this->curUrlArray['href'],$this->siteURL); - if (isset($this->curUrlArray['external']) && $this->curUrlInfo['act'] != 'mail') { + if (isset($this->curUrlArray['data-htmlarea-external']) && $this->curUrlInfo['act'] != 'mail') { $this->curUrlInfo['act'] = 'url'; $this->curUrlInfo['info'] = $this->curUrlArray['href']; } @@ -533,7 +533,7 @@ class tx_rtehtmlarea_browse_links extends browse_links { if (document.ltargetform.anchor_class) browse_links_setClass(document.ltargetform.anchor_class.value); if (document.ltargetform.ltarget) browse_links_setTarget(document.ltargetform.ltarget.value); if (document.ltargetform.lrel) browse_links_setAdditionalValue("rel", document.ltargetform.lrel.value); - browse_links_setAdditionalValue("external", ""); + browse_links_setAdditionalValue("data-htmlarea-external", ""); plugin.createLink(theLink,cur_target,cur_class,cur_title,additionalValues); return false; } @@ -543,7 +543,7 @@ class tx_rtehtmlarea_browse_links extends browse_links { if (document.ltargetform.anchor_class) browse_links_setClass(document.ltargetform.anchor_class.value); if (document.ltargetform.ltarget) browse_links_setTarget(document.ltargetform.ltarget.value); if (document.ltargetform.lrel) browse_links_setAdditionalValue("rel", document.ltargetform.lrel.value); - browse_links_setAdditionalValue("external", ""); + browse_links_setAdditionalValue("data-htmlarea-external", ""); plugin.createLink(theLink,cur_target,cur_class,cur_title,additionalValues); return false; } @@ -551,7 +551,7 @@ class tx_rtehtmlarea_browse_links extends browse_links { if (document.ltargetform.anchor_title) browse_links_setTitle(document.ltargetform.anchor_title.value); if (document.ltargetform.anchor_class) browse_links_setClass(document.ltargetform.anchor_class.value); if (document.ltargetform.ltarget) browse_links_setTarget(document.ltargetform.ltarget.value); - browse_links_setAdditionalValue("external", ""); + browse_links_setAdditionalValue("data-htmlarea-external", ""); plugin.createLink(theLink,cur_target,cur_class,cur_title,additionalValues); return false; } @@ -710,7 +710,7 @@ class tx_rtehtmlarea_browse_links extends browse_links { <tr> <td>'.$LANG->getLL('emailAddress',1).':</td> <td><input type="text" name="lemail"'.$this->doc->formWidth(20).' value="'.htmlspecialchars($this->curUrlInfo['act']=='mail'?$this->curUrlInfo['info']:'').'" /> '. - '<input type="submit" value="'.$LANG->getLL('setLink',1).'" onclick="browse_links_setTarget(\'\');browse_links_setHref(\'mailto:\'+document.lurlform.lemail.value);browse_links_setAdditionalValue(\'external\', \'\');return link_current();" /></td> + '<input type="submit" value="'.$LANG->getLL('setLink',1).'" onclick="browse_links_setTarget(\'\');browse_links_setHref(\'mailto:\'+document.lurlform.lemail.value);browse_links_setAdditionalValue(\'data-htmlarea-external\', \'\');return link_current();" /></td> </tr> </table> </form>'; @@ -727,7 +727,7 @@ class tx_rtehtmlarea_browse_links extends browse_links { <tr> <td>URL:</td> <td><input type="text" name="lurl"'.$this->doc->formWidth(20).' value="'.htmlspecialchars($this->curUrlInfo['act']=='url'?$this->curUrlInfo['info']:'http://').'" /> '. - '<input type="submit" value="'.$LANG->getLL('setLink',1).'" onclick="if (/^[A-Za-z0-9_+]{1,8}:/.test(document.lurlform.lurl.value)) { browse_links_setHref(document.lurlform.lurl.value); } else { browse_links_setHref(\'http://\'+document.lurlform.lurl.value); }; browse_links_setAdditionalValue(\'external\', \'1\'); return link_current();" /></td> + '<input type="submit" value="'.$LANG->getLL('setLink',1).'" onclick="if (/^[A-Za-z0-9_+]{1,8}:/.test(document.lurlform.lurl.value)) { browse_links_setHref(document.lurlform.lurl.value); } else { browse_links_setHref(\'http://\'+document.lurlform.lurl.value); }; browse_links_setAdditionalValue(\'data-htmlarea-external\', \'1\'); return link_current();" /></td> </tr> </table> </form>'; @@ -935,7 +935,7 @@ class tx_rtehtmlarea_browse_links extends browse_links { <td> </td> <td colspan="3"> - <input type="submit" value="'.$LANG->getLL('update',1).'" onclick="' . (($this->act == 'url') ? 'browse_links_setAdditionalValue(\'external\', \'1\'); ' : '') .'return link_current();" /> + <input type="submit" value="'.$LANG->getLL('update',1).'" onclick="' . (($this->act == 'url') ? 'browse_links_setAdditionalValue(\'data-htmlarea-external\', \'1\'); ' : '') .'return link_current();" /> </td> </tr>'; } @@ -1173,4 +1173,4 @@ if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLA include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['ext/rtehtmlarea/mod3/class.tx_rtehtmlarea_browse_links.php']); } -?> \ No newline at end of file +?>