Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

possible load bug ?

 [1/4] from: laurent:giroud:libertysurf at: 10-Aug-2002 20:23


Hi, this is probably a rookie error but playing with the load function I noticed that when doing either of test: load http://www.google.fr test: load/all http://www.google.fr and saving test to a file via save %test.html test the resulting file does not contain as much data as what's obtained by doing view source in the navigator : the 'test data stops at a "&nbsp" whereas the real html data is much longer. Did I make a trivial error, or is it a Rebol bug ? I guess that such an obvious one would have been spotted for long but one never knows... Best regards, Laurent -- Laurent Giroud [laurent--giroud--libertysurf--fr]

 [2/4] from: greggirwin::mindspring::com at: 10-Aug-2002 12:53


Hi Laurent, << test: load http://www.google.fr test: load/all http://www.google.fr and saving test to a file via save %test.html test the resulting file does not contain as much data as what's obtained by doing view source in the navigator : the 'test data stops at a "&nbsp" whereas the real html data is much longer. >> You can read the data using READ or READ/BINARY and then you should have it all. To load it, you might use LOAD/MARKUP. --Gregg

 [3/4] from: laurent:giroud:libertysurf at: 10-Aug-2002 21:20


> I don't know why your code isn't woking, though it seems to be choking on the > script command. But 'Load is not a good way to capture untrusted strings.
<<quoted lines omitted: 14>>
> test: read/lines http://www.google.fr > write/lines %test.html test
Thanks for the explanation ! So this is effectively a rookie error ;) the code : test: load/markup URL doesn't exhibit the problem which confirms that the problem arises because of load trying to interpret the html page. This leads me to ask why /markup is implemented as a 'load refinement ? Wouldn't it be better placed within 'read ? Regards, Laurent -- Laurent Giroud

 [4/4] from: greggirwin:mindspring at: 10-Aug-2002 13:53


Hi Laurent, << This leads me to ask why /markup is implemented as a 'load refinement ? Wouldn't it be better placed within 'read ? >> READ doesn't perform any evaluation of the data, while LOAD does. READ allows you to acquire data, even untrusted data, and then process it as you see fit. --Gregg

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted