[BUGFIX] Content rendering: Definition lists in RTE are wrapped in p
authorStanislas Rolland <typo3@sjbr.ca>
Mon, 6 Feb 2012 20:20:28 +0000 (15:20 -0500)
committerTolleiv Nietsch <info@tolleiv.de>
Tue, 21 Feb 2012 21:23:03 +0000 (22:23 +0100)
Definition lists entered in the RTE are wrapped in paragraph tags when
rendered in the frontend. This is not valid HTML.

Solution: Add dl and dd to lib.parseFunc_RTE.externalBlocks and
process them recursively like div. Add dt to
nonTypoTagStdWrap.encapsLines.encapsTagList

Resolves: #25083
Releases: 4.5, 4.6, 4.7

Change-Id: Ia73d01105beeaba59f91dd87754c7528796d4d07
Reviewed-on: http://review.typo3.org/9077
Reviewed-by: Stanislas Rolland
Tested-by: Stanislas Rolland
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters
Reviewed-by: Tolleiv Nietsch
Tested-by: Tolleiv Nietsch
typo3/sysext/css_styled_content/static/constants.txt
typo3/sysext/css_styled_content/static/setup.txt
typo3/sysext/css_styled_content/static/v4.5/constants.txt
typo3/sysext/css_styled_content/static/v4.5/setup.txt

index 33a4992..851c052 100644 (file)
@@ -26,7 +26,7 @@ styles.content.links {
     # cat=content/links; type=small; label= Target for external links
   extTarget = _blank
   target = {$PAGE_TARGET}
-  allowTags = b,i,u,a,img,br,div,center,pre,font,hr,sub,sup,p,strong,em,li,ul,ol,blockquote,strike,del,ins,span,h1,h2,h3,h4,h5,h6,address
+  allowTags = b,i,u,a,img,br,div,center,pre,font,hr,sub,sup,p,strong,em,li,ul,ol,blockquote,strike,del,ins,span,h1,h2,h3,h4,h5,h6,address,dl,dt,dd
 }
 
 styles.content.imgtext {
index 075b331..5a2c413 100644 (file)
@@ -92,7 +92,7 @@ lib.parseFunc_RTE < lib.parseFunc
 lib.parseFunc_RTE {
        //  makelinks >
        # Processing <table> and <blockquote> blocks separately
-       externalBlocks = table, blockquote, ol,ul, div
+       externalBlocks = table, blockquote, dd, dl, ol,ul, div
        externalBlocks {
                # The blockquote content is passed into parseFunc again...
                blockquote.stripNL=1
@@ -125,9 +125,13 @@ lib.parseFunc_RTE {
                }
                div.stripNL = 1
                div.callRecursive = 1
+
+               # Definition list processing
+               dl < .div
+               dd < .div
        }
        nonTypoTagStdWrap.encapsLines {
-               encapsTagList = p,pre,h1,h2,h3,h4,h5,h6,hr
+               encapsTagList = p,pre,h1,h2,h3,h4,h5,h6,hr,dt
                remapTag.DIV = P
                nonWrappedTag = P
                innerStdWrap_all.ifBlank = &nbsp;
index 7826898..e15bcf6 100644 (file)
@@ -26,7 +26,7 @@ styles.content.links {
     # cat=content/links; type=small; label= Target for external links
   extTarget = _blank
   target = {$PAGE_TARGET}
-  allowTags = b,i,u,a,img,br,div,center,pre,font,hr,sub,sup,p,strong,em,li,ul,ol,blockquote,strike,del,ins,span,h1,h2,h3,h4,h5,h6,address
+  allowTags = b,i,u,a,img,br,div,center,pre,font,hr,sub,sup,p,strong,em,li,ul,ol,blockquote,strike,del,ins,span,h1,h2,h3,h4,h5,h6,address,dl,dt,dd
 }
 
 styles.content.imgtext {
index 420ad69..695937a 100644 (file)
@@ -92,7 +92,7 @@ lib.parseFunc_RTE < lib.parseFunc
 lib.parseFunc_RTE {
        //  makelinks >
        # Processing <table> and <blockquote> blocks separately
-       externalBlocks = table, blockquote, ol,ul, div
+       externalBlocks = table, blockquote, dd, dl, ol,ul, div
        externalBlocks {
                # The blockquote content is passed into parseFunc again...
                blockquote.stripNL=1
@@ -121,9 +121,13 @@ lib.parseFunc_RTE {
                }
                div.stripNL = 1
                div.callRecursive = 1
+
+               # Definition list processing
+               dl < .div
+               dd < .div
        }
        nonTypoTagStdWrap.encapsLines {
-               encapsTagList = p,pre,h1,h2,h3,h4,h5,h6,hr
+               encapsTagList = p,pre,h1,h2,h3,h4,h5,h6,hr,dt
                remapTag.DIV = P
                nonWrappedTag = P
                innerStdWrap_all.ifBlank = &nbsp;