Bug located in Map generating code - Fix is here

5 posts / 0 new
Last post
zs6sgm
Offline
Last seen: 1 year 2 months ago
Joined: 2014/02/02 - 11:31
Bug located in Map generating code - Fix is here

Hi Guys,

I have been really battling to get the 60m map working for certain time frames. I have located the problem.

One of the callsigns is reported as "G4ZFQ\" (The "\" is included in the database).
The javascript built to render the map inserts the callsign into the place marker function call.

A normal javascript call looks like this:
createMarker(map, p_15, 'ZS6KTS', 'labeltx', 'ZS6KTSHeard by: DF6MK, F59706, G4CAO, G4ZFQ, G4ZFQ\, NL8992, OZ7IT, ZS1AGF, ZS5JT, ZS6SGM');

But when alan's call sign (complete with the "\" character) renders in the javascript it renders like this

createMarker(map, p_8, 'G4ZFQ\', 'labelrx', 'G4ZFQRx 5.250000Hearing: G4ZFQ, ZS6KTS');

The "\" character performs a javascript ESCAPE on the next character which is '

The javascript dies thinking it has an unterminated string and the map does not show.

The correct javascript to be generated should look like this

createMarker(map, p_8, 'G4ZFQ\\', 'labelrx', 'G4ZFQRx 5.250000Hearing: G4ZFQ, ZS6KTS');

Notice the double "\\" characters which perform the ESCAPE sequence correctly.

I would recommend escaping the following three characters in the javascript in case they are in the call sign

"
'
\