Author Topic: flyout-menu.xml special characters  (Read 741 times)

0 Members and 1 Guest are viewing this topic.

Offline jachen

  • Member
  • *
  • Posts: 39
    • Neue Wetterstation Widen
flyout-menu.xml special characters
« on: May 21, 2019, 03:15:50 PM »
Hi everyone

Maybe somebody has experience on how to treat special characters within the flyout-menu.xml.

I would like to use "©" or maybe a ® . Unable to render correctly. You can view it under Navigation Isobaren http://meteo.widen-online.ch/wxisobarendwd.php?lang=en.

Have a nice day.

Offline txweather.org

  • Forecaster
  • *****
  • Posts: 1597
    • Texas Weather
Re: flyout-menu.xml special characters
« Reply #1 on: May 21, 2019, 03:18:21 PM »
Try this: @

IE: <item caption="Home &#169;" link="index.php" title="Home Page"/>

edit: I get the same render issue you get.... Mhhh

Looks like the xml encode/unicode is not rendering properly... I am not a web experts so I would probably wait for some of the veterans to chime in.
« Last Edit: May 21, 2019, 03:36:55 PM by txweather.org »

----
Davis Vantage Pro2 Plus +FARS|Meteobridge Nano SD|Meteohub|Meteobridge MR-3020|WU KTXSPRIN75/PWS JRARGWX75/CWOP EW2972/WBB TXWDVUE75/Blitzortung ID: 1142|AWEKAS: 12095
Donations are welcome: https://paypal.me/ffuentesb

Offline saratogaWX

  • Administrator
  • Forecaster
  • *****
  • Posts: 9257
  • Saratoga, CA, USA Weather - free PHP scripts
    • Saratoga-Weather.org
Re: flyout-menu.xml special characters
« Reply #2 on: May 21, 2019, 04:07:12 PM »
Ahh.. because of XML parsing rules, you have to 'double encode' Ampersands

So for <item caption="Home ©" link="index.php" title="Home Page"/> make it

<item caption="Home &amp;amp#169;" link="index.php" title="Home Page"/>

Replace all  '&' with '&amp;amp' in the XML and it will work.
Ken True/Saratoga, CA, USA main site: saratoga-weather.org
Davis VP1+ FARS, Blitzortung RED, GRLevel3, WD, WL, VWS, Cumulus, Meteobridge
Free weather PHP scripts/website templates - update notifications on Twitter saratogaWXPHP

Offline txweather.org

  • Forecaster
  • *****
  • Posts: 1597
    • Texas Weather
Re: flyout-menu.xml special characters
« Reply #3 on: May 21, 2019, 04:15:19 PM »
As allways Thanks Ken!!! :D

----
Davis Vantage Pro2 Plus +FARS|Meteobridge Nano SD|Meteohub|Meteobridge MR-3020|WU KTXSPRIN75/PWS JRARGWX75/CWOP EW2972/WBB TXWDVUE75/Blitzortung ID: 1142|AWEKAS: 12095
Donations are welcome: https://paypal.me/ffuentesb

Offline Cutty Sark Sailor

  • WxElement panel
  • Forecaster
  • *****
  • Posts: 3393
    • Frankfort Weather - TwinHollies WeatherCenter
Re: flyout-menu.xml special characters
« Reply #4 on: May 21, 2019, 11:21:04 PM »
ah,... er.. &amp;amp#169;  :?:    ... but I miss things.. sometimes.. anyway: for ©
...without it showing as was simply  &amp;#169; or &amp;copy;
« Last Edit: May 21, 2019, 11:24:21 PM by Cutty Sark Sailor »
 


Offline jachen

  • Member
  • *
  • Posts: 39
    • Neue Wetterstation Widen
Re: flyout-menu.xml special characters
« Reply #5 on: May 22, 2019, 05:20:34 AM »
Thanks a lot to all contributing to this topic.

This worked for me:
Code: [Select]
<item caption="Isobaren" title= "Isobaren heute">
  <item caption= "Isobaren &amp;#169; MeteoGroup" title="Isobaren1" link="wxisobaren.php"/>
  <item caption= "Isobaren &amp;#169; DWD"  title="Isobaren2" link="wxisobarendwd.php"/>
</item>

Probably running in issues now with the language translations. Anyway, it's very much fun.

Cheers