search for: escapehtml

Displaying 15 results from an estimated 15 matches for "escapehtml".

2007 Aug 01
0
The escapeHTML and unescapeHTML functions on Internet Explorer
I have a question about the escapeHTML and unescapeHTML functions. I''m using the prototype.js in a project and noticed that Internet Explorer needs to also have double quotes escaped/unescaped. Has anyone else run into this problem? --~--~---------~--~----~------------~-------~--~----~ You received this message because you...
2006 Nov 02
2
Rescue don't work on web applications
...#39;ve a Rails application who starts a Ruby script . The script is made via Web -> database. Than you can select a script to start via a database list. Problem: In case of errors , I like to start a rescue showing the users the problems. render(:text => "<pre>" + CGI::escapeHTML(` begin /home/luc/radrails/cpe/public/startq_test.rb #{syntf.path} rescue NoMethodError,SyntaxError,NameError,StandardError,SystemExit,ScriptError => snfault fltlog = File.open("/test/result/script.log", "w") fltlog.puts "#{s...
2006 Jan 23
3
prototype.js: enumerable mixin for hash broken
...ter playing around with the very inspiring prototype library I have found a rather annoying thing, that makes the usefulness of the Enumerable mixin for Hashes questionable, if I am not totally wrong (again :-). Here an example: var a = $H({a:1, b:2, c:1, d:3}); document.writeln(a.inspect().escapeHTML()); // yields: #<Hash:{''a'': 1, ''b'': 2, ''c'': 1, ''d'': 3}> var b = a.reject(function(val){ return (val[1]==1) }); document.writeln(b.inspect().escapeHTML()); // yields: [[''b'', 2], [''d'', 3...
2008 Sep 05
3
Still confused on content blocks...
...s} Here are the relevant parts of my default.template: --- name:content, pipeline:tags,redcloth,blocks <html> <body> <div id="content"> <webgen:block name="content" /> </div> {includeFile: {filename: analytics.page, escapeHTML: false, processOutput: false}} </body> </html> And here is my analytics.page: <script src="http://www.google-analytics.com/urchin.js" type="text/javascript"> </script> <script type="text/javascript"> _uacct = "UA-1234567-1";...
2006 Jun 02
1
escaping quotes for generating xml
Hi, I need to have my controller return xml from db content. Is there a method I can call to clean up the text for xml rendering? I tried CGI:escapeHTML, but forgot it would ignore quotes. some of the db content is going in xml attributes so the quotes need escaping. thanks. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060602/6b4c19a0/attachment.html
2006 Mar 21
1
Konqueror Ajax update
...oday (or yesterday) that Konqueror ( 3.4.3) could handle Ajax perfectly, at least as far as the simplest AWDWR Ajax example (./example/index) was concerned. It occurred to me to do a more grueling test. I took the "periodically_call_remote" example (./example/periodic), and specified CGI::escapeHTML(`ps -ef | grep ruby`) in the "ps" action. With "ps -ef", I enjoyed an Ajax "top" in a browser!. I used the default refresh rate of 2 Since I have a Slackware box, and there is currently a client''s KUbuntu box in the workshop, I fired up two separate "loca...
2007 Dec 23
1
Rails: possible routing discrepancy
...{"select"=>"all"}} but there seems to be a discrepancy nonetheless. Then I started poking around in action_view/helpers/url_helper.rb, in current_page?, which is used by link_to_unless_current. Here''s that method: def current_page?(options) url_string = CGI.escapeHTML(url_for(options)) request = @controller.request if url_string =~ /^\w+:\/\// url_string == "#{request.protocol}#{request.host_with_port}# {request.request_uri}" else url_string == request.request_uri end end So here''s the rub: When I''m running cur...
2005 Jul 08
8
Integrating script.aculo.us into existing javascript codebase
Hi, I''m new to this mailing list, so first off, a big THANK YOU for the script.aculo.us and prototype.js libraries. I''m trying to integrate script.aculo.us into an existing pretty large Javascript codebase (see http://openrecord.org). I''m running into a problem with prototype.js and the existing codebase''s use of for/in loops over an Array.
2009 May 25
1
Passing a JavaScript variable through a Rails params hash
Hi guys, hoping someone can give me a pointer with this? I have a Javascript variable that I''m updating dynamically as a user interacts with the page. I want the user to be able to save it''s value at any time along with some text data in a pop-up form, so the best way I can think of is to pass it through the params hash without writing it into the form. I''m not totally
2006 Mar 23
4
Error with Rails 1.1RC1 and Properties page
...the http://localhost:3000 page and clicked on the "About your application''s environment" link, and an error was displayed: NoMethodError in Rails/info#properties private method `gsub'' called for 1:Fixnum RAILS_ROOT: script/../config/.. /usr/lib/ruby/1.8/cgi.rb:362:in `escapeHTML_fail_on_nil'' /usr/lib/ruby/gems/1.8/gems/actionpack-1.11.2.4008/lib/action_controller/cgi_ext/cgi_ext.rb:13:in `escapeHTML'' /usr/lib/ruby/gems/1.8/gems/rails-1.0.0.4008/builtin/rails_info/rails/info.rb:55:in `to_html'' /usr/lib/ruby/gems/1.8/gems/rails-1.0.0.4008/builtin/r...
2008 Apr 07
4
Staff Manager tutorial from "Prototype and script.aculo.us" by Christophe Porteneuve
...#39;', node); }, createDOMFragment: function(parentId, node) { var element = new Element(''li'', { id: node.id }); var tpl = this._templates[node.children ? ''group'' : ''person'']; var escapedNode = { id: node.id, name: node.name.escapeHTML() }; element.update(tpl.evaluate(escapedNode)); $(parentId).down(''ul'').appendChild(element); element.down(''input'').checked = node.checked; this.makeVisible(node.id); return node; }, find: function(id, nodes) { nodes = nodes || this.no...
2008 Jun 15
11
[PATCH] helper to create fb css stylized table
I attached a rails helper implementation of the fb_table described here: http://wiki.developers.facebook.com/index.php/Facebook_Styles I included testing and comments. I hope you find it useful. Curiously, it''s really a small extension of FBML. Richard -------------- next part -------------- Index: test/rails_integration_test.rb
2006 Apr 14
1
Script.aculo.us Effects with callbacks not working as it should.
...ent_elements[''save_button'']).disabled = true; Element.show(content_elements[''busy_indicator'']); // Get the contents of the editor and escape any html. var content = tinyMCE.getContent($(content_elements[''editor''])).escapeHTML(); // Escape all the nasty characters. var content = content.replace(/=/g,"*equals*"); var content = content.replace(/&/g,"*ampersand*"); var content = content.replace(/\+/g,"*plus*"); var content = content.replace(...
2009 Jul 07
0
[PATCH server] Update app to work with rails 2.3.2
...Ajax.InPlaceEditor = Class.create({ initialize: function(element, url, options) { @@ -604,7 +604,7 @@ Ajax.InPlaceEditor = Class.create({ this.triggerCallback('onEnterHover'); }, getText: function() { - return this.element.innerHTML; + return this.element.innerHTML.unescapeHTML(); }, handleAJAXFailure: function(transport) { this.triggerCallback('onFailure', transport); @@ -780,7 +780,7 @@ Ajax.InPlaceCollectionEditor = Class.create(Ajax.InPlaceEditor, { onSuccess: function(transport) { var js = transport.responseText.strip(); if...
2009 Jul 20
9
Upgrade server to run on Rails 2.3.2/F11
Note that one of the 8 patches (#6) will be sent separately in reply to this email, as some of the replaced lines are too long, so git won't let me send the email. However, there is nothing wrong with that patch, and it should be applied in the sequence listed below. Note also that I assume this will be tested on a clean f11 install, rather than an upgrade of an existing ovirt server