loofah multibyte regex (Was: [ANN] loofah 0.4.7 Released)

M

Mike Dalessio

2010/10/26 Une B=E9vue said:
because i'm using daily nokogiri i wanted to test loofah with a small
script (coming from <http://loofah.rubyforge.org/loofah/>) :

#! /opt/local/bin/ruby1.9
# encoding: utf-8

require 'rubygems'
require 'nokogiri'
require 'loofah'

unsafe_html=3D"ohai! <div>div is safe</div> <script>but script is
not</script>"

doc=3DLoofah.fragment(unsafe_html).scrub!:)strip)
puts doc.to_s

however i got :
SyntaxError:
/opt/local/lib/ruby1.9/gems/1.9.1/gems/loofah-1.0.0/lib/loofah/html5/scr
ub.rb:20: too short escaped multibyte character:
/`|[\000-\040\177\s]+|\302[\200-\240]/
method require in untitled document at line 29
method require in untitled document at line 29
method <top (required)> in loofah.rb at line 9
method require in untitled document at line 33
method rescue in require in untitled document at line 33
method require in untitled document at line 29
method <main> in loofah_first_test.rb at line 22


ruby 1.9.2p0 (2010-08-18 revision 29036) [x86_64-darwin10]
over Mac OS X SL


I think a 7-month-old ruby-talk announcement thread is probably the wrong
forum to discuss any issues you're having, so I've opened a github issue to
track this: http://github.com/flavorjones/loofah/issues/#issue/25

Hint: I need more information in order to reproduce the issue, so please po=
p
on over to the ticket now so we can figure out the root cause.

Thanks.
 
U

Une Bévue

Mike Dalessio said:
I think a 7-month-old ruby-talk announcement thread is probably the wrong
forum to discuss any issues you're having, so I've opened a github issue to
track this: http://github.com/flavorjones/loofah/issues/#issue/25

I do agree very well !!!
Hint: I need more information in order to reproduce the issue, so please pop
on over to the ticket now so we can figure out the root cause.

OK, i'll have a look there, thanks a lot !
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,021
Latest member
AkilahJaim

Latest Threads

Top