Follow-up to issue #11009: External links get prepended with base url in RTE htmlArea...
authorStanislas Rolland <typo3@sjbr.ca>
Thu, 2 Jul 2009 03:08:22 +0000 (03:08 +0000)
committerStanislas Rolland <typo3@sjbr.ca>
Thu, 2 Jul 2009 03:08:22 +0000 (03:08 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@5667 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
typo3/sysext/rtehtmlarea/mod3/class.tx_rtehtmlarea_browse_links.php
typo3/sysext/rtehtmlarea/mod3/class.tx_rtehtmlarea_dam_browse_links.php

index 9fce69c..48b57db 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-07-01  Stanislas Rolland  <typo3@sjbr.ca>
+
+       * Follow-up to issue #11009: External Links get prepended with http://typo3 in RTE htmlArea in Firefox 3.0.11/3.5b4
+
 2009-07-01  Oliver Hader  <oliver@typo3.org>
 
        * Follow-up to feature #9615: Renamed extension from fe_edit to feedit
index 55cfac4..73119c0 100644 (file)
@@ -699,7 +699,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="browse_links_setHref(document.lurlform.lurl.value); 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); }; return link_current();" /></td>
                                                        </tr>
                                                </table>
                                        </form>';
index 7fa6ca0..2811959 100644 (file)
@@ -611,7 +611,7 @@ class tx_rtehtmlarea_dam_browse_links extends tx_dam_browse_media {
                                                        <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="setValue(document.lurlform.lurl.value); return link_current();" /></td>
+                                                                       '<input type="submit" value="'.$LANG->getLL('setLink',1).'" onclick="if (/^[A-Za-z0-9_+]{1,8}:/i.test(document.lurlform.lurl.value)) { setValue(document.lurlform.lurl.value); } else { setValue(\'http://\'+document.lurlform.lurl.value); }; return link_current();" /></td>
                                                        </tr>
                                                </table>
                                        </form>';