
RedCloth 4 encloses </object> within a paragraph
Reported by Jarkko Laine | November 16th, 2008 @ 08:13 PM
This is a really weird bug that seems to affect both 4.1 and 4.0.3 but not 3.0.1.
>> rc = RedCloth.new(c.add_youtube(str))
=> "<p><object width=\"340\" height=\"280\"><param name=\"movie\" value=\"http://www.youtube.com/v/iUbK1cBHm6E\"></param><param name=\"wmode\" value=\"opaque\"></param><param name=\"allowScriptAccess\" value=\"sameDomain\"></param><embed src=\"http://www.youtube.com/v/iUbK1cBHm6E\" type=\"application/x-shockwave-flash\" width=\"340\" height=\"280\" wmode=\"opaque\" allowScriptAccess=\"sameDomain\"></embed></object></p>"
>> rc.to_html
=> "<p><object width=\"340\" height=\"280\"><param name=\"movie\" value=\"http://www.youtube.com/v/iUbK1cBHm6E\"></param><param name=\"wmode\" value=\"opaque\"></param><param name=\"allowScriptAccess\" value=\"sameDomain\"></param><embed src=\"http://www.youtube.com/v/iUbK1cBHm6E\" type=\"application/x-shockwave-flash\" width=\"340\" height=\"280\" wmode=\"opaque\" allowScriptAccess=\"sameDomain\"></embed><p></object></p></p>"
Note how to_html puts the closing tag within another p element (thus creating invalid html) even though there is no line break or anything (or even whitespace) around the object tag.
I just noticed since one of our tests started breaking with RedCloth 4.
Comments and changes to this ticket
-
Jason Garber November 19th, 2008 @ 09:13 AM
- State changed from new to resolved
(from [48bae66854dcc89b62d5381e73984666abcf4e51]) Fixed object embedding being mangled. [#87 state:resolved]
Fixed being recognized as a block-level element when using the twice-cooked method of flash embedding. http://github.com/jgarber/redclo...
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป
RedCloth is a Ruby library for converting Textile into HTML
People watching this ticket
Referenced by
-
87 RedCloth 4 encloses </object> within a paragraph (from [48bae66854dcc89b62d5381e73984666abcf4e51]) Fixed o...