jpatokal / openflights

Website for storing flight information, rendering paths on a zoomable world map and calculating statistics, with plenty of free airline, airport and route data.
http://openflights.org
GNU Affero General Public License v3.0
1.37k stars 387 forks source link

Fix broken link to format specification on import page. #1455

Closed dyung closed 5 months ago

dyung commented 7 months ago

I noticed that trying to click on the "format specification" link on the import page did not work, and this is my attempt to fix it. Note that I have nearly 0 experience with PHP and only slightly more with javascript, but I think this should work. (I also unfortunately did not know how to test this).

Looking at the generated HTML page, you can see the link appears to be pretty broken:

See <a href="#help" onClick="javascript:window.open(" help csv.php", "CSV", "width="500," height="400,scrollbars=yes&quot;)&quot;">format specification</a>

My fix is based on similar code in html/settings.php which does something similar and does seem to work. Namely I had to change most of the double quotes to single quotes and escape the double quotes used for arguments to window.open().

I'm cautiously optimistic that this would fix the issue here.