Fixing downloading of documents from the Web.
This commit is contained in:
parent
9153efbbba
commit
8f509a0133
@ -68,9 +68,9 @@ GrafoscopioUtils class >> sanitize: url [
|
|||||||
operations that rely on sane and well formed urls don't throw error messages."
|
operations that rely on sane and well formed urls don't throw error messages."
|
||||||
| sanitized modUrl |
|
| sanitized modUrl |
|
||||||
modUrl := url.
|
modUrl := url.
|
||||||
[modUrl endsWith: ' ']
|
[modUrl asString endsWith: ' ']
|
||||||
whileTrue: [ modUrl := modUrl copyFrom: 1 to: (modUrl size - 1) ].
|
whileTrue: [ modUrl := modUrl copyFrom: 1 to: (modUrl size - 1) ].
|
||||||
(url beginsWith: 'http://')
|
(url asString beginsWith: 'http://')
|
||||||
ifFalse: [ sanitized := ('http://', modUrl) asUrl ]
|
ifFalse: [ sanitized := ('http://', modUrl) asUrl ]
|
||||||
ifTrue: [ sanitized := modUrl asUrl ].
|
ifTrue: [ sanitized := modUrl asUrl ].
|
||||||
^ sanitized
|
^ sanitized
|
||||||
|
Loading…
Reference in New Issue
Block a user