Skip to content

Commit

Permalink
Fixed object embedding being mangled. [#87 state:resolved]
Browse files Browse the repository at this point in the history
Fixed <embed> being recognized as a block-level element when using the twice-cooked method of flash embedding.
  • Loading branch information
jgarber committed Nov 19, 2008
1 parent b4d61b7 commit 48bae66
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG
@@ -1,5 +1,7 @@
=== Edge

* Fixed <embed> being recognized as a block-level element when using the twice-cooked method of flash embedding. #87

* Added horizontal rules from RedCloth 3. Three or more asterisks, dashes, or underscores between blocks triggers the HR tag.

* echoe was not being properly registered as a development dependency; a bug in RubyGems was making it a runtime dependency
Expand Down
2 changes: 1 addition & 1 deletion ext/redcloth_scan/redcloth_scan.rl
Expand Up @@ -45,7 +45,7 @@
aligned_image = ( "["? "!" (IMG_A_LEFT | IMG_A_RIGHT) ) >A @{ p = reg - 1; } ;

# html blocks
BlockTagName = Name - ("pre" | "notextile" | "a" | "applet" | "basefont" | "bdo" | "br" | "font" | "iframe" | "img" | "map" | "object" | "param" | "q" | "script" | "span" | "sub" | "sup" | "abbr" | "acronym" | "cite" | "code" | "del" | "dfn" | "em" | "ins" | "kbd" | "samp" | "strong" | "var" | "b" | "big" | "i" | "s" | "small" | "strike" | "tt" | "u");
BlockTagName = Name - ("pre" | "notextile" | "a" | "applet" | "basefont" | "bdo" | "br" | "font" | "iframe" | "img" | "map" | "object" | "param" | "embed" | "q" | "script" | "span" | "sub" | "sup" | "abbr" | "acronym" | "cite" | "code" | "del" | "dfn" | "em" | "ins" | "kbd" | "samp" | "strong" | "var" | "b" | "big" | "i" | "s" | "small" | "strike" | "tt" | "u");
block_start_tag = "<" BlockTagName space+ AttrSet* (AttrEnd)? ">" | "<" BlockTagName ">";
block_empty_tag = "<" BlockTagName space+ AttrSet* (AttrEnd)? "/>" | "<" BlockTagName "/>" ;
block_end_tag = "</" BlockTagName space* ">" ;
Expand Down
10 changes: 8 additions & 2 deletions test/html.yml
Expand Up @@ -300,6 +300,12 @@ html: '<p><a href="http://foo.com/bar?something=1~2~3">http://foo.com/bar?someth
---
name: empty block
in: |-
<embed src="test.swf"></embed>
<div class="test"></div>
html: |-
<embed src="test.swf"></embed>
<div class="test"></div>
---
name: objects in paragraphs are not modified
in: |-
<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>
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></object></p>

0 comments on commit 48bae66

Please sign in to comment.