cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X

url with & does not work as hyperlink in Vuforia View

ankitgupta08
7-Bedrock

url with & does not work as hyperlink in Vuforia View

Hi All,

 

url with '&' does not work as hyperlink in Vuforia View Application. I tried changing it to %26 but it fails. Does anyone has any solution for the same.

 

Regards,

Ankit Gupta

ACCEPTED SOLUTION

Accepted Solutions

Hello @ankitgupta08 ,

 

do you have an example what do you need to achieve - is this a link /Studio widget / where  open a URL and there  you want to use '&' for passing of URL  paramters 

One possible option is to decode it - example

www.ptc.com/mytest?test=123&test2=234&test3=3455

so where you can URL Decode

www.ptc.com%2Fmytest%3Ftest%3D123%26test2%3D234%26test3%3D3455

and to URL encode to encode it back

you can  test the url encode/decode on this web site

And believe that it should work but of course it depends on the your particular case (mobile device ...etc)  and may be need to be further tested.

 

View solution in original post

3 REPLIES 3

Hello @ankitgupta08 ,

 

do you have an example what do you need to achieve - is this a link /Studio widget / where  open a URL and there  you want to use '&' for passing of URL  paramters 

One possible option is to decode it - example

www.ptc.com/mytest?test=123&test2=234&test3=3455

so where you can URL Decode

www.ptc.com%2Fmytest%3Ftest%3D123%26test2%3D234%26test3%3D3455

and to URL encode to encode it back

you can  test the url encode/decode on this web site

And believe that it should work but of course it depends on the your particular case (mobile device ...etc)  and may be need to be further tested.

 

So I did tested it further on samsung Galaxy S9+ and it link with parameters was working fine without decoding/encoding - there was not problem with the '&' characters in the url

So tested the Hypeling Text widget to demo webpage

2019-01-24_16-05-33.gif

Tested first in preview and it was working fine.

Tested then on mobile device Samsung Galaxy S9+ with the latest Vuforia View and it was working also ok

 

Another question - it could be  an issue of the server where you want to open the link (urf8... etc..)

So in the exmaple below I pasted the link containing a &characters

2019-01-24_16-47-07.gif

wher the URL property of the widget was set to :

http://urlecho.appspot.com/echo?status=200&body=<?xml%20version='1.0'%20encoding='utf-8'?>%20<feed%20xmlns='http://www.w3.org/2005/Atom'>%20<title>Example%20Feed</title>%20<subtitle>A%20subtitle.</subtitle>%20<link%20href='http://example.org/feed/'%20rel='self'%20/>%20<link%20href='http://example.org/'%20/>%20<id>urn:uuid:60a76c80-d399-11d9-b91C-0003939e0af6</id>%20<updated>2003-12-13T18:30:02Z</updated>%20<author>%20<name>John%20Doe</name>%20<email>johndoe@example.com</email>%20</author>%20<entry>%20<title>Atom-Powered%20Robots%20Run%20Amok</title>%20<link%20href='http://example.org/2003/12/13/atom03'%20/>%20<id>urn:uuid:1225c695-cfb8-4ebb-aaaa-80da344efa6a</id>%20<updated>2003-12-13T18:30:02Z</updated>%20<summary>Some%20text.</summary>%20</entry>%20</feed>&Content-Type=application/atom+xml

May be if this work in your case - you can use this element to set the url property and then emit a click event... etc.

@RolandRaytchev Thank you so much for the help. My url also had a backslash which was causing the issue. But somehow after removing the & the link worked with blackslash.

After replacing backslash (\) with %5C; it worked fine.

 

Thank you for all the help.

Announcements

Top Tags