0

Uncaught Error: Syntax error, unrecognized expression: #skill-game-list option[value='aprendre à compter jusqu'à 5']

There is error sended by Chrome when i try to select an element with a specific value. this value is loaded from DB.

Rory McCrossan
  • 331,213
  • 40
  • 305
  • 339
gildas kevin
  • 161
  • 1
  • 1
  • 8
  • 1
    Does this answer your question? [Need to escape a special character in a jQuery selector string](https://stackoverflow.com/questions/2786538/need-to-escape-a-special-character-in-a-jquery-selector-string) – peeebeee Jan 15 '20 at 14:32
  • try the `escapeSelector` $.escapeSelector("'aprendre à compter jusqu'à 5'") – gpro Jan 15 '20 at 14:32
  • The need to escape the `'` within the value, which you can do with ```\\```: `#skill-game-list option[value='aprendre à compter jusqu\\'à 5']` – Rory McCrossan Jan 15 '20 at 14:33

0 Answers0