String gsub problem

Why doesn’t this work?

mytext = mytext:gsub(" ", “%20”)

Or even better, how do I make it work? :slight_smile:

Oskwish [import]uid: 24111 topic_id: 21588 reply_id: 321588[/import]

% needs to be escaped

mytext = mytext:gsub(" ", “%%20”) [import]uid: 119459 topic_id: 21588 reply_id: 85616[/import]