Sie sind nicht angemeldet.

1

Freitag, 3. August 2012, 16:07

&, & and %26

Hi all!

I know there are several threads on this forum concerning the encoding of ampersand in the html but I think I'm stuck.

If I use the flash version of krpano and I encode my starting url with %26, it's ok.
If I disable flash on safari and encode the url with %26, it's not ok (it uses the url but stops at the first %26).

With & it's the other way round, the url is used correctly in safari but not in the flash version of krpano...

Any ideas?

Thanks!

2

Montag, 6. August 2012, 09:50

A bit more detailed:

My xml is dynamically generated using GET variables I send to it.

I add the xml file with :

Quellcode

1
viewer.addVariable("xml","http://test.mysite.com/test.php?one=1&two=2");


I tried the test with:
  1. Normal &
  2. &
  3. &

Trying to send "one=1&two=2" with flash enabled, GET values are respectively sent as:
  1. one:1
  2. one:1
  3. one:1
    two:2

With flash disabled:
  1. one:1
    two:2
  2. one:1
    amp;two:2
  3. one:1&two


How could I send the same values with flash disabled/enabled?

Beiträge: 1 857

Beruf: Virtual Tours - Photography - Krpano developer

  • Nachricht senden

3

Montag, 6. August 2012, 14:18

I use the embed user agent code to create an ampersand. Check my site for this. There's probably an easier way but that was the first method. > and < are also tricky. Also Aldo's new textfieldex has an unfiltered output option .text
You can feed it escaped entities and read out the output. Use an extra % sign in some cases.
KRPano Developer: Portfolio ::Gigapixel Tagging Solutions - Porfolio 2 :: Facebook :: Twitter :: reddit.com/r/VirtualTour

4

Freitag, 10. August 2012, 09:47

Okay, I used the user agent to check whether to use & or %26.
I find it weird but it works, thanks.

Shame you can't do this automatically!