Index: t3lib/class.t3lib_parsehtml_proc.php
===================================================================
--- t3lib/class.t3lib_parsehtml_proc.php (révision 7223)
+++ t3lib/class.t3lib_parsehtml_proc.php (copie de travail)
@@ -648,8 +648,11 @@
unset($attribArray_copy['rteerror']);
}
if (!count($attribArray_copy)) { // Only if href, target and class are the only attributes, we can alter the link!
+ // Quoting class and title attributes if they contain spaces
+ $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 "" for the link (includes href/url, target and class attributes):
- $bTag='';
+ $bTag='';
$eTag='';
$blockSplit[$k] = $bTag.$this->TS_links_db($this->removeFirstAndLastTag($blockSplit[$k])).$eTag;
} else { // ... otherwise store the link as a-tag.
Index: typo3/class.browse_links.php
===================================================================
--- typo3/class.browse_links.php (révision 7223)
+++ typo3/class.browse_links.php (copie de travail)
@@ -804,7 +804,7 @@
// CurrentUrl - the current link url must be passed around if it exists
if ($this->mode == 'wizard') {
- $currentLinkParts = t3lib_div::trimExplode(' ',$this->P['currentValue']);
+ $currentLinkParts = t3lib_div::unQuoteFilenames($this->P['currentValue'], TRUE);
$initialCurUrlArray = array (
'href' => $currentLinkParts[0],
'target' => $currentLinkParts[1],
@@ -968,6 +968,14 @@
if (cur_title == "" && cur_class == "-") {
cur_class = "";
}
+ cur_class = cur_class.replace(/[\'\"]/g, "");
+ if (cur_class.indexOf(" ") != -1) {
+ cur_class = "\"" + cur_class + "\"";
+ }
+ cur_title = cur_title.replace(/(^\")|(\"$)/g, "");
+ if (cur_title.indexOf(" ") != -1) {
+ cur_title = "\"" + cur_title + "\"";
+ }
input = input + " " + cur_target + " " + cur_class + " " + cur_title;
field.value = input;
'.$update.'