Upload of an html file fails #9

Closed
yoshimo opened this Issue Nov 9, 2013 · 1 comment

Projects

None yet

2 participants

@yoshimo
yoshimo commented Nov 9, 2013

I am running the latest kubuntu and i installed ruby 1.9 to try this tool.
Now when i select the html document tab , select a file on my disk and hit upload i get:

Error:Could not upload file on the detox browser page

the terminal with the webserver is telling me:
[Quote]

Encoding::UndefinedConversionError - "\xC3" from ASCII-8BIT to UTF-8:
/home/sam/Downloads/jsdetox-master/jsdetox/app/controllers/backend.rb:67:in encode' /home/sam/Downloads/jsdetox-master/jsdetox/app/controllers/backend.rb:67:into_json'
/home/sam/Downloads/jsdetox-master/jsdetox/app/controllers/backend.rb:67:in block (2 levels) in <top (required)>' /var/lib/gems/1.9.1/gems/padrino-core-0.10.6/lib/padrino-core/application/routing.rb:569:incall'
/var/lib/gems/1.9.1/gems/padrino-core-0.10.6/lib/padrino-core/application/routing.rb:569:in block in route' /var/lib/gems/1.9.1/gems/padrino-core-0.10.6/lib/padrino-core/application/routing.rb:51:in[]'
/var/lib/gems/1.9.1/gems/padrino-core-0.10.6/lib/padrino-core/application/routing.rb:51:in block (3 levels) in process_destination_path' /var/lib/gems/1.9.1/gems/sinatra-1.3.6/lib/sinatra/base.rb:876:inroute_eval'
/var/lib/gems/1.9.1/gems/padrino-core-0.10.6/lib/padrino-core/application/routing.rb:51:in block (2 levels) in process_destination_path' /var/lib/gems/1.9.1/gems/padrino-core-0.10.6/lib/padrino-core/application/routing.rb:51:incatch'
/var/lib/gems/1.9.1/gems/padrino-core-0.10.6/lib/padrino-core/application/routing.rb:51:in block in process_destination_path' /var/lib/gems/1.9.1/gems/padrino-core-0.10.6/lib/padrino-core/application/routing.rb:25:ininstance_eval'
/var/lib/gems/1.9.1/gems/padrino-core-0.10.6/lib/padrino-core/application/routing.rb:25:in process_destination_path' (eval):166:inblock (2 levels) in inject_root_methods'
(eval):156:in catch' (eval):156:inblock in inject_root_methods'
/var/lib/gems/1.9.1/gems/http_router-0.10.2/lib/http_router/node/root.rb:92:in []' /var/lib/gems/1.9.1/gems/http_router-0.10.2/lib/http_router.rb:119:inblock in call'
/var/lib/gems/1.9.1/gems/http_router-0.10.2/lib/http_router.rb:119:in catch' /var/lib/gems/1.9.1/gems/http_router-0.10.2/lib/http_router.rb:119:incall'
/var/lib/gems/1.9.1/gems/padrino-core-0.10.6/lib/padrino-core/application/routing.rb:919:in route!' /var/lib/gems/1.9.1/gems/padrino-core-0.10.6/lib/padrino-core/application/routing.rb:909:indispatch!'
/var/lib/gems/1.9.1/gems/sinatra-1.3.6/lib/sinatra/base.rb:794:in block in call!' /var/lib/gems/1.9.1/gems/sinatra-1.3.6/lib/sinatra/base.rb:946:inblock in invoke'
/var/lib/gems/1.9.1/gems/sinatra-1.3.6/lib/sinatra/base.rb:946:in catch' /var/lib/gems/1.9.1/gems/sinatra-1.3.6/lib/sinatra/base.rb:946:ininvoke'
/var/lib/gems/1.9.1/gems/sinatra-1.3.6/lib/sinatra/base.rb:794:in call!' /var/lib/gems/1.9.1/gems/sinatra-1.3.6/lib/sinatra/base.rb:780:incall'
/var/lib/gems/1.9.1/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:225:in context' /var/lib/gems/1.9.1/gems/rack-1.5.2/lib/rack/session/abstract/id.rb:220:incall'
/var/lib/gems/1.9.1/gems/sass-3.2.12/lib/sass/plugin/rack.rb:54:in call' /var/lib/gems/1.9.1/gems/rack-1.5.2/lib/rack/head.rb:11:incall'
/var/lib/gems/1.9.1/gems/rack-1.5.2/lib/rack/methodoverride.rb:21:in call' /var/lib/gems/1.9.1/gems/padrino-core-0.10.6/lib/padrino-core/reloader.rb:250:incall'
/var/lib/gems/1.9.1/gems/padrino-core-0.10.6/lib/padrino-core/logger.rb:388:in call' /var/lib/gems/1.9.1/gems/sinatra-1.3.6/lib/sinatra/showexceptions.rb:21:incall'
/var/lib/gems/1.9.1/gems/sinatra-1.3.6/lib/sinatra/base.rb:1417:in block in call' /var/lib/gems/1.9.1/gems/sinatra-1.3.6/lib/sinatra/base.rb:1499:insynchronize'
/var/lib/gems/1.9.1/gems/sinatra-1.3.6/lib/sinatra/base.rb:1417:in call' /var/lib/gems/1.9.1/gems/padrino-core-0.10.6/lib/padrino-core/router.rb:83:inblock in call'
/var/lib/gems/1.9.1/gems/padrino-core-0.10.6/lib/padrino-core/router.rb:76:in each' /var/lib/gems/1.9.1/gems/padrino-core-0.10.6/lib/padrino-core/router.rb:76:incall'
/var/lib/gems/1.9.1/gems/rack-1.5.2/lib/rack/handler/webrick.rb:60:in service' /usr/lib/ruby/1.9.1/webrick/httpserver.rb:138:inservice'
/usr/lib/ruby/1.9.1/webrick/httpserver.rb:94:in run' /usr/lib/ruby/1.9.1/webrick/server.rb:191:inblock in start_thread'
[/Quote]

@svent
Owner
svent commented Dec 17, 2013

Thanks for your bug report!
I will commit an update in a few minutes that enables UTF-8 handling for file uploads.

@svent svent closed this in 32181e2 Dec 17, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment