• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Replacing "+" in url variable to spaces

New Here ,
Jan 31, 2007 Jan 31, 2007

Copy link to clipboard

Copied

Hello, thanks in advance for your help.

I want to pass a url variable as a title for a page. I want to separate the words with a "+" in the url.. then when I output it on the webpage, I want to "+" to get replaced with spaces. Is there a function that will do that?

Thanks, Steve
TOPICS
Advanced techniques

Views

308

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Jan 31, 2007 Jan 31, 2007

Copy link to clipboard

Copied

Why bother using plus signs as word separators? Use blanks. Before you put the title into the URL, use the function URLEncodedFormat() to encode the spaces.

If that does not work for your application some reason (such as the text is already delimited with plus signs when you get it), you can use the Replace() function to change the plus signs to spaces before you display the title.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 31, 2007 Jan 31, 2007

Copy link to clipboard

Copied

Mike, thanks for the reply... I was just trying to get pointed in the right direction. I'm going to look into the replace () function.

Steve

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jan 31, 2007 Jan 31, 2007

Copy link to clipboard

Copied

LATEST
Many search applications use the "+" delimiter for the search term in the URL. So this isn't that uncommon.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation