Jump to content
Sign in to follow this  
XbabylonX

Replace function

Recommended Posts

Hello,

string Spot="http://maps.secondlife.com/secondlife/" + llGetRegionName() + "/128/128/22";

 with the above piece of code Im trying to create a string to say in the local chat. Works fine but only when the sim name has no white spaces. When having one or more, the link includes only the first word and leaves all the other out of it.

I guess I need to replace the white space (in llGetRegionName()) with %20 and be treated as one word. But I cant find a replace function. Or there is another way to solve this problem?

Thank you!

Share this post


Link to post
Share on other sites

:matte-motes-sarcasm:

llEscapeURL()

That did it yeah.

The string now is the correct one and Im ok with it. However, out of curiocity I would like to know this 

Sim Name (199,61,4014) 

The chat displays the above as a link. Is it possible to make it look like a web link? Just like we did in html? For example:

<a href="http://www.example.com">Blah blah click me I am a link</a>

 

Share this post


Link to post
Share on other sites


XbabylonX wrote:

:matte-motes-sarcasm:

llEscapeURL()

That did it yeah.

The string now is the correct one and Im ok with it. However, out of curiocity I would like to know this 

Sim Name (199,61,4014) 

The chat displays the above as a link. Is it possible to make it look like a web link? Just like we did in html? For example:

<a href="
Blah blah click me I am a link</a>

 

llOwnerSay("the link is  [http://maps.secondlife.com/Ahern/128/128/0 Ahern(128, 128, 0)], how about that!")

other alternatives will automatically pretty print:

secondlife://Ahern/128/128/0 for the place profile

secondlife:///app/worldmap/Mohrr/128/128/0 for a map floater

 

these won't do the formatting in some viewers that intentionally use retro interfaces, like Singularity, but we don't have to worry much about this because these people are getting the interface they want.

Share this post


Link to post
Share on other sites


Jopsy Pendragon wrote:

Chat will hilite legit URLs, but you can't hide a url with a label.    I guess to prevent things like:

Search for more of this great stuff on... <a href="

that one actually works as

llOwnerSay("Search for more of this great stuff on  [http://my.malicious.site.net:3984 Google]!");

but you can see the real link if you mouse over it.

some things are restricted from chat, like secondlife:///app/teleport/EvilSanbox/5/6/78 but many forms thought to be safe are allowed.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...