Hi Walter,
I use the live_tree plugin (http://www.epiphyte.ca/code/
live_tree.html)
to generate a file system browser.
When a user clicks a file it is displayed using this partial:
<div id="editme"><%= file_contents %></div>
<%= in_place_editor 'editme',
:url => url_for({ :action => 'save_file', :path => path }),
:save_text => 'save',
:rows => 20,
:cols => 5
%>
File contents are displayed properly meaning all special characters
(especially "bigger than", "less than", "ampersand" and "double
quotes")
are displayed as unescaped characters.
However, when the user clicks the "editme"-div
the in_place_editor is activated and those special characters get
escaped.
I don't want this to happen...
I tried to make this work using a pure scriptaculous-inplaceeditor,
something like:
<script>
//...
var text = this.getText().unescapeHTML();
var textField = document.createElement("input");
textField.value = text;
this.editField = textField;
//...
</script>
however I have not succeeded so far...
Thanks for your help,
Tom.
On Apr 19, 7:32 pm, Walter Lee Davis <[EMAIL PROTECTED]> wrote:
> Where in the chain are you trying to escape/unescape the form contents?
> Are you describing a server-side or client-side process?
>
> Walter
>
> On Apr 19, 2007, at 12:20 PM, Tom V. wrote:
>
> > again sorry for the late reply!
> > Could you please specify how to escape/unescape the contents of a
> > form.
> > This here doesn't work:
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Spinoffs" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-spinoffs?hl=en
-~----------~----~----~----~------~----~------~--~---