Fixing downloading of documents from the Web.

This commit is contained in:
Offray Vladimir Luna Cárdenas 2017-09-25 09:43:59 +00:00 committed by SantiagoBragagnolo
parent 5599a2e23c
commit 6970be8fa5
1 changed files with 2 additions and 2 deletions

View File

@ -68,9 +68,9 @@ GrafoscopioUtils class >> sanitize: url [
operations that rely on sane and well formed urls don't throw error messages."
| sanitized modUrl |
modUrl := url.
[modUrl endsWith: ' ']
[modUrl asString endsWith: ' ']
whileTrue: [ modUrl := modUrl copyFrom: 1 to: (modUrl size - 1) ].
(url beginsWith: 'http://')
(url asString beginsWith: 'http://')
ifFalse: [ sanitized := ('http://', modUrl) asUrl ]
ifTrue: [ sanitized := modUrl asUrl ].
^ sanitized