Ruby url encode

Posted in Uncategorized on Jan 20, 2013

In one of the projects I’m working on I’ve been seeing the following all over the codebase.

CGI.escape(plaintext).gsub(“+”, “%20”).gsub(“%7E”, “~”)

At first you wonder why are they replacing “+” with “%20”.
Then you realize what they really wanted to use was “URI.encode”.

When using “URI.encode” you don’t need to gsub “+” with “%20”.

Trackback URI | Comments RSS

8 Responses to “ Ruby url encode ”

  1. # 1 Lorena Says:

    It’s hard to find your website in google. I found it on 14
    spot, you should build quality backlinks , it will help you to increase traffic.
    I know how to help you, just search in google –
    k2 seo tricks

  2. # 2 air max blanche Says:

    chaussures nike on a tous fait du sport ensembleIl est malade depuis 1665. Il est cocu depuis son mariage avec Armande Béjart, trop jeune s?ur de Madeleine ou nike air max tailwind 2 sa fille, susurrent les mauvaises langues. Il tousse. Alors, à chaque fois que je rue dans les brancards, je le fais pour eux. nike free run pas cher homme ” Ce processus d”identification qu”il provoque représente désormais sa marque de fabrique. Au fil du temps, il est devenu l”acteur, voire l”i

  3. # 3 ray ban aviator Says:

    Many straight men are wondering if they are doing a little something wrong. Other guys find a way to attract the attention of the most lovely women. What’s the difference between those men plus themselves? This hub gives a number of very useful tips that many men should know. Within the credit research space, their sector specialization was infrastructure and gafas ray ban FMCG. He features also been an equity study analyst Oakley holbrook with JP Morgan, based in Mumbai, gafas de sol ray ban th

  4. # 4 Lauren Oliver Says:

    say something once,why say it again?

  5. # 5 Felix Says:

    I read a lot of interesting content here. Probably you spend a lot of time writing, i know how to save you a lot
    of work, there is an online tool that creates high
    quality, SEO friendly posts in minutes, just search in google – laranitas free content source

  6. # 6 facebook fans Says:

    Both males and females are nearly always concerned with the future and have absolutely invested heavily to make certain tomorrow can be as good as can be. Many people even sign up in a wide variety of methods, strategies or even a name alteration to always make sure that they’ve got a bright future.

  7. # 7 Maximo Pines Says:

    May I simply say what a relief to find someone that genuinely understands what they are talking about on the web. You actually know how to bring a problem to light and make it important. More people really need to look at this and understand this side of your story. I can’t believe you are not more popular because you surely have the gift.

  8. # 8 Phil St Ores Says:

    Phil St Ores…

    FernyB | Ruby url encode…

Leave a Reply

  • Recent Comments

    • Jsdpd40: More of Mr. Trump’s ministry nominees will done patent the Senate. More Obama application policies wish be...
    • Jagkodu: More of Mr. Trump’s lowboy nominees choice shortly unencumbered the Senate. More Obama charge policies wish...
    • おすすめ育毛シャンプー: 拝見させていただきました。とても役に立ちました。お礼申し上げ ます。育毛シャンプーについて僕も出来る限り調べていましたが、 ひとつ参考になったサイトが見つけましたのでご紹介したいと思い ます。...
    • link homepage: You actually make it seem really easy together with your presentation but I find this matter to be...
    • sell online: Case Dislike Solution but Streets 51390426 of times !! Great Post :)

    Recent Listened to Tracks

    Loading...

eastern-avalanche
eastern-avalanche
eastern-avalanche
eastern-avalanche