search for: inner_text

Displaying 6 results from an estimated 6 matches for "inner_text".

Did you mean: index_text
2010 Feb 02
0
[Security] Loofah has an HTML injection / XSS vulnerability, please upgrade to 0.4.6
...de Loofah::DocumentDecorator # - # Returns a plain-text version of the markup contained by the document + # Returns a plain-text version of the markup contained by the document, + # with HTML entities encoded. # def text - xpath("/html/body").inner_text + encode_special_chars xpath("/html/body").inner_text end alias :inner_text :text alias :to_str :text diff --git a/lib/loofah/html/document_fragment.rb b/lib/loofah/html/document_fragment.rb index feed705..9c023af 100644 --- a/lib/loofah/html/document_fragm...
2007 Apr 30
7
Migrating spec_helper with modifications
...t class in which I should be including this module? The errors I''m getting are of the following type: undefined method `elements'' for #<#<Class:0xb6f12a14>:0xb6eb8ff0> element(s) is a top-level method, so I would do things like the following: element("p").inner_text.should == "Hello World" The following link shows HpricotSpecHelper (with syntax highlighting): http://src.chrishoffman.net/lib/hpricot_spec_helper.rb Please let me know if I am not being clear with my difficulty. Thanks for the help. -Chris -------------- next part -------------- An...
2008 Nov 27
3
How to parse info from an xml response
Hi all! In my app I want to detect what country a visitor is viewing from by their IP. Although it''s by no means perfect, the simplest option I''ve found is by using this site: http://api.hostip.info/ by passing the ip address as a query, this site returns an xml file with the country as one of the tags. http://api.hostip.info/?ip=6.255.255.255 returns (amongst other things)
2009 Jun 06
5
Rake Tasks
..."span.s").inner_html.split(''<br />'').collect{ |str| pair = str.strip.split(''='').collect{|val| val.strip} Hash[pair[0], pair[1]] } if(values.length==1) cells << cell.inner_text.strip else cells << values.strip end elsif cells << cell.inner_text.strip end end @rows << cells end @rows.shift # Shifting removes the row containing the <th> table header ele...
2007 Sep 23
1
Selecting Links with their parent class attribute?
Hi all, Trying to figure out a quick way to do something. I have a yahoo groups list, and it has listings that look like this: </td></tr> <tr><td colspan="2" class="ygrp-g"> <span class="ygrp-nowrap"> <em><a href="/group/freecycledc/">freecycledc</a></em> </span> <a
2009 Jun 07
17
ActiveRecord Classes
I''m having a little trouble with understanding how to work out the schematic for some of my classes using ActiveRecord when a file is in my lib directory: Brief example: Here''s the outline of the files in use: ....app ........controllers ............application_controller.rb ............rushing_offenses_controller.rb ........models ............rushing_offense.rb ....lib