[Resolved] Gsub string

I am trying to convert a string of text into something that twitter can post so here is some code i have been using.

 \_G.finalTweet = "what a fun day out"  
  
  
  
 local finalTweetSwitch = string.gsub(\_G.finalTweet, " " , "%20")   
 --here is my final tweet and i am saying replace any spaces with %20  
 print(finalTweetSwitch)  
 native.showWebPopup(0, 100, 320, 300, "http://twitter.com/intent/tweet?text=  
  
-- an example provided by another form  
--My%20tweet%20goes%20here")  

The problem is with the string.gsub… If i replace the %20 with a random letter it works but once i put it back it doesnt. I isolated the problem but i am not sure what to do now.

Thanks [import]uid: 24708 topic_id: 27823 reply_id: 327823[/import]

 native.showWebPopup(0, 100, 320, 300, "http://twitter.com/intent/tweet?text="..finalTweetSwitch  

forgot to put that up [import]uid: 24708 topic_id: 27823 reply_id: 112652[/import]

% is a special character for gsub. You need to escape the % with a 2nd %.

Try %%20 instead of %20 [import]uid: 19626 topic_id: 27823 reply_id: 112658[/import]

Yeah i was looking at the documentation and i saw that it was a special character!
and yes it worked now! thank you very much [import]uid: 24708 topic_id: 27823 reply_id: 112660[/import]