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
  • 7,547
  • 12
  • 36
  • 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,029
  • 2
  • 34
  • 55
0

Just use decodeURI

decodeURI("cha%C3%AEne");
ic3b3rg
  • 14,063
  • 4
  • 25
  • 49