Ugly HTML appeared for no apparent reason

Support Ticket

+status
answered
 

I'm just checking out Wagn, so I installed it, made a CardType and an instance of that type.  However, when I go to edit the CardType card, it displays an ugly block of HTML (included in the example), rather than anything I can work with.  Bleah!  Not a good first impression.

<input id="main_faa4615-hidden-content" name="card[content]" type="hidden" value="&lt;p&gt;I'm making a CardType (aka Category) here. &amp;nbsp;Will this do anything?&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;add a Ugly HTML appeared for no apparent reason+example card&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;h2&gt;Ugly HTML appeared for no apparent reason+example Cards&lt;/h2&gt; &lt;blockquote&gt; &lt;p&gt;

&lt;/p&gt; &lt;/blockquote&gt;" /> <textarea id="main_faa4615-tinymce" name="content_to_replace" rows="3">&lt;p&gt;I'm making a CardType (aka Category) here. &amp;nbsp;Will this do anything?&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;p&gt;add a Ugly HTML appeared for no apparent reason+example card&lt;/p&gt; &lt;p&gt;&amp;nbsp;&lt;/p&gt; &lt;h2&gt;Ugly HTML appeared for no apparent reason+example Cards&lt;/h2&gt; &lt;blockquote&gt; &lt;p&gt;&lt;/p&gt; &lt;/blockquote&gt;</textarea> <script type="text/javascript"> //<![CDATA[ setTimeout((function(){ tinyMCE.init({mode: "exact",elements: "main_faa4615-tinymce",width: '100%', auto_resize : true, relative_urls: false, theme : "advanced", theme_advanced_buttons1 : "formatselect,bold,italic,separator," + "blockquote,bullist,numlist,hr,separator,undo,redo," + "code", theme_advanced_buttons2 : "", theme_advanced_buttons3 : "", theme_advanced_path : false, theme_advanced_toolbar_location : "top", theme_advanced_toolbar_align : "left", theme_advanced_resizing : true, theme_advanced_resize_horizontal : false, theme_advanced_statusbar_location : "bottom", theme_advanced_blockformats : "p,h1,h2", content_css : '/stylesheets/defaults.css,/card/view/*css?layout=none', extended_valid_elements : "a[name|href|target|title|onclick]," + "img[class|src|border=0|alt|title|hspace|vspace|width|height|" + "align|onmouseover|onmouseout|name],hr[class|width|size|noshade]," + "font[face|size|color|style],span[class|align|style]" }) tinyMCE.execInstanceCommand( 'main_faa4615-tinymce', 'mceFocus' ); }),50); Wagn.onSaveQueue['main_faa4615'].push(function(){ t = tinyMCE.getInstanceById( 'main_faa4615-tinymce' ); $('main_faa4615-hidden-content').value = t.getContent(); return true; }); //]]> </script>

 

Hi,

 

What rails version are you using?  Try using rails version 2.3.5.  The rails guys introduced some weird HTML escaping bugs in version 2.3.6.


Ah, that seemed to fix it, thanks.

 

Added this to environment.rb

RAILS_GEM_VERSION = '2.3.5' unless defined? RAILS_GEM_VERSION

  --mtraven (Not signed in).....Wed Jul 28 18:41:22 -0700 2010


yeah I should have put that in master as soon as we saw that rails bug. Just pushed it there. Thanks!

  --Ethan McCutchen.....Thu Jul 29 12:16:08 -0700 2010