Project

General

Profile

This project is closed and read-only.

Actions

Misc #3692

closed

URI should escape or parse [ and ]

Misc #3692: URI should escape or parse [ and ]

Added by mlanett (Mark Lanett) about 16 years ago. Updated over 15 years ago.

Status:
Rejected
Assignee:
-
[ruby-core:31710]

Description

=begin
This fails:
URI.parse( URI.escape("http://example.com/some[1].jpg") )

It raises URI::InvalidURIError

It should either parse or escape the brackets.
I know they are considered to be "unsafe". It doesn't matter. Some web pages use them and the Ruby libraries should be able to parse data in the field.

The alternative is to write additional escaping code anywhere one uses URI.escape because it is inadequate.
=end


Related issues 1 (0 open — 1 closed)

Is duplicate of Ruby meta - Bug #3457: URI.encode does not escape square bracketsRejectedActions

Updated by naruse (Yui NARUSE) about 16 years ago Actions #1

  • Status changed from Open to Rejected

=begin
URI.escape is not for this use case.
See also Bug #3457.
=end

Actions

Also available in: PDF Atom