1

I'm using some code to extract from a Google Url the keyword of the search. Thanks to an answer to my previous post ( Extract keyword from Google search in Javascript ) I was able to do this.

But I realized that words using accent marks give me trouble (eg. "chaƮne" (French word) is translated "cha%C3%AEne"). Did someone have the same problem and wrote some magical regex ? :-)

Bruno

Community
  • 1
  • 1
Bruno
  • 8,497
  • 13
  • 38
  • 55

2 Answers2

1

You probably want to decode the string. Use

decodeURIComponent("cha%C3%AEne");

see here and here

Community
  • 1
  • 1
morja
  • 8,297
  • 2
  • 39
  • 59
0

Just use decodeURI

decodeURI("cha%C3%AEne");
ic3b3rg
  • 14,629
  • 4
  • 30
  • 53