HTMLUtilities.st
changeset 2087 6a7385a63ce0
parent 2067 2fa1e3466abc
child 2144 c89258333f4d
equal deleted inserted replaced
2086:4ffc55b2f921 2087:6a7385a63ce0
   182         ws nextPut: c.
   182         ws nextPut: c.
   183     ].
   183     ].
   184     ^ ws contents
   184     ^ ws contents
   185 
   185 
   186     "
   186     "
   187      self new unEscape:'a%20b' 
   187      self unEscape:'a%20b'   
   188      self new unEscape:'a%%b'
   188      self unEscape:'a%%b'
   189      self new unEscape:'a+b' 
   189      self unEscape:'a+b' 
   190      self new unEscape:'a%+b' 
   190      self unEscape:'a%+b' 
   191     "
   191     "
   192 !
   192 !
   193 
   193 
   194 urlEncoded: aString
   194 urlEncoded: aString
   195     "helper to escape invalid/dangerous characters in an urls arguments or post-fields.
   195     "helper to escape invalid/dangerous characters in an urls arguments or post-fields.
   230     ].
   230     ].
   231     ^ ws contents
   231     ^ ws contents
   232 
   232 
   233 
   233 
   234     "
   234     "
   235      self new escape:'a b'      
   235      self escape:'a b'      
   236      self new escape:'a%b'    
   236      self escape:'a%b'    
   237      self new escape:'a b'      
   237      self escape:'a b'      
   238      self new escape:'a+b'      
   238      self escape:'a+b'      
   239     "
   239     "
   240 !
   240 !
   241 
   241 
   242 withSpecialHTMLCharactersEscaped:aStringOrCharacter
   242 withSpecialHTMLCharactersEscaped:aStringOrCharacter
   243     "replace ampersand, less and greater by html-character escapes"
   243     "replace ampersand, less and greater by html-character escapes"
   320 ! !
   320 ! !
   321 
   321 
   322 !HTMLUtilities class methodsFor:'documentation'!
   322 !HTMLUtilities class methodsFor:'documentation'!
   323 
   323 
   324 version
   324 version
   325     ^ '$Header: /cvs/stx/stx/libbasic2/HTMLUtilities.st,v 1.3 2008-12-03 19:41:11 cg Exp $'
   325     ^ '$Header: /cvs/stx/stx/libbasic2/HTMLUtilities.st,v 1.4 2009-01-14 10:38:16 sr Exp $'
   326 ! !
   326 ! !