haskell / haskell/network-uri

Is `isUnescapedInURI` written incorrectly?

Open
#78 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Haskell
Stars
28
Forks
34
PR merge metrics
No merged PRs in 30d

Description

`isUnescapedInURI` documentation says:

> Returns **True if the character is allowed unescaped** in a URI.

However, its implementation is:

```haskell
isUnescapedInURI c = isReserved c || isUnreserved c
```

where `isReserved` documentation says:

> Returns True if the character is a "reserved" character in a URI. To include a literal instance of one of these characters in a component of a URI, it must be escaped.

So, it seems to me that if `isReserved` returns `True`, then `isUnescapedInURI` ought to return `False.`

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.