diff --git a/oauthlib/common.py b/oauthlib/common.py
index f25656f..c1180e6 100644
--- a/oauthlib/common.py
+++ b/oauthlib/common.py
@@ -114,7 +114,7 @@ def decode_params_utf8(params):
     return decoded
 
 
-urlencoded = set(always_safe) | set('=&;:%+~,*@!()/?')
+urlencoded = set(always_safe) | set('=&;:%+~,*@!()/?\'$')
 
 
 def urldecode(query):

ValueError when query string contains "'"
Similar to Issue #404, `oauthlib.common.urldecode` raises a ValueError if the provided query string contains a "'" character.

```
ValueError: Error trying to decode a non urlencoded string. Found invalid characters: set([u"'"]) in the string: 'url=Schr%C3%B6dinger's%20cat'. Please ensure the request/response body is x-www-form-urlencoded.
```

Per [RFC 3986 section 3.4](
https://tools.ietf.org/html/rfc3986#section-3.4), query strings should be allowed to include the characters defined as `pchar` which in turn allows for characters defined as `sub-delims`.  This includes the "'" character.
diff --git a/tests/test_common.py b/tests/test_common.py
index b0ea20d..fb4bd5b 100644
--- a/tests/test_common.py
+++ b/tests/test_common.py
@@ -39,6 +39,8 @@ class EncodingTest(TestCase):
         self.assertItemsEqual(urldecode('foo=bar@spam'), [('foo', 'bar@spam')])
         self.assertItemsEqual(urldecode('foo=bar/baz'), [('foo', 'bar/baz')])
         self.assertItemsEqual(urldecode('foo=bar?baz'), [('foo', 'bar?baz')])
+        self.assertItemsEqual(urldecode('foo=bar\'s'), [('foo', 'bar\'s')])
+        self.assertItemsEqual(urldecode('foo=$'), [('foo', '$')])
         self.assertRaises(ValueError, urldecode, 'foo bar')
         self.assertRaises(ValueError, urldecode, '%R')
         self.assertRaises(ValueError, urldecode, '%RA')

pip install -e .
parse_log_pytest
requirements.txt
nose coverage pytest
apt-get update apt-get install -y gcc
3.6
requirements.txt
pytest --no-header -rA --tb=line --color=no -p no:cacheprovider -W ignore::DeprecationWarning
attrs==22.2.0
blinker==1.4
certifi==2021.5.30
cffi==1.15.1
coverage==6.2
cryptography==40.0.2
importlib-metadata==4.8.3
iniconfig==1.1.1
nose==1.3.7
-e git+https://github.com/oauthlib/oauthlib.git@371029906aa6ccc9943120e096a7bbdd0ef6945d#egg=oauthlib
packaging==21.3
pluggy==1.0.0
py==1.11.0
pycparser==2.21
PyJWT==1.6.0
pyparsing==3.1.4
pytest==7.0.1
tomli==1.2.3
typing_extensions==4.1.1
zipp==3.6.0

name: oauthlib
channels:
  - defaults
  - https://repo.anaconda.com/pkgs/main
  - https://repo.anaconda.com/pkgs/r
  - conda-forge
dependencies:
  - _libgcc_mutex=0.1=main
  - _openmp_mutex=5.1=1_gnu
  - ca-certificates=2025.2.25=h06a4308_0
  - certifi=2021.5.30=py36h06a4308_0
  - ld_impl_linux-64=2.40=h12ee557_0
  - libffi=3.3=he6710b0_2
  - libgcc-ng=11.2.0=h1234567_1
  - libgomp=11.2.0=h1234567_1
  - libstdcxx-ng=11.2.0=h1234567_1
  - ncurses=6.4=h6a678d5_0
  - openssl=1.1.1w=h7f8727e_0
  - pip=21.2.2=py36h06a4308_0
  - python=3.6.13=h12debd9_1
  - readline=8.2=h5eee18b_0
  - setuptools=58.0.4=py36h06a4308_0
  - sqlite=3.45.3=h5eee18b_0
  - tk=8.6.14=h39e8969_0
  - wheel=0.37.1=pyhd3eb1b0_0
  - xz=5.6.4=h5eee18b_1
  - zlib=1.2.13=h5eee18b_1
  - pip:
      - attrs==22.2.0
      - blinker==1.4
      - cffi==1.15.1
      - coverage==6.2
      - cryptography==40.0.2
      - importlib-metadata==4.8.3
      - iniconfig==1.1.1
      - nose==1.3.7
      - packaging==21.3
      - pluggy==1.0.0
      - py==1.11.0
      - pycparser==2.21
      - pyjwt==1.6.0
      - pyparsing==3.1.4
      - pytest==7.0.1
      - tomli==1.2.3
      - typing-extensions==4.1.1
      - zipp==3.6.0
prefix: /opt/conda/envs/oauthlib

tests/test_common.py::EncodingTest::test_urldecode
tests/test_common.py::ParameterTest::test_add_params_to_uri tests/test_common.py::ParameterTest::test_extract_invalid tests/test_common.py::ParameterTest::test_extract_non_formencoded_string tests/test_common.py::ParameterTest::test_extract_params_blank_string tests/test_common.py::ParameterTest::test_extract_params_dict tests/test_common.py::ParameterTest::test_extract_params_empty_list tests/test_common.py::ParameterTest::test_extract_params_formencoded tests/test_common.py::ParameterTest::test_extract_params_twotuple tests/test_common.py::GeneratorTest::test_generate_client_id tests/test_common.py::GeneratorTest::test_generate_nonce tests/test_common.py::GeneratorTest::test_generate_timestamp tests/test_common.py::GeneratorTest::test_generate_token tests/test_common.py::RequestTest::test_dict_body tests/test_common.py::RequestTest::test_empty_dict_body tests/test_common.py::RequestTest::test_empty_list_body tests/test_common.py::RequestTest::test_empty_string_body tests/test_common.py::RequestTest::test_getattr_existing_attribute tests/test_common.py::RequestTest::test_getattr_raise_attribute_error tests/test_common.py::RequestTest::test_getattr_return_default tests/test_common.py::RequestTest::test_list_body tests/test_common.py::RequestTest::test_non_formencoded_string_body tests/test_common.py::RequestTest::test_non_unicode_params tests/test_common.py::RequestTest::test_none_body tests/test_common.py::RequestTest::test_param_free_sequence_body tests/test_common.py::RequestTest::test_password_body tests/test_common.py::RequestTest::test_sanitizing_authorization_header tests/test_common.py::RequestTest::test_token_body tests/test_common.py::CaseInsensitiveDictTest::test_basic tests/test_common.py::CaseInsensitiveDictTest::test_update
oauthlib/common.py
oauthlib/common.py