]> git.openstreetmap.org Git - nominatim.git/commit
more generalized javascript_renderData
authorSarah Hoffmann <lonvia@denofr.de>
Sun, 1 Jul 2012 11:19:59 +0000 (13:19 +0200)
committerSarah Hoffmann <lonvia@denofr.de>
Sun, 1 Jul 2012 14:29:12 +0000 (16:29 +0200)
commit0c714f12b4137017e842a10cda0f47839a84dfb9
treebd0a9e4a939d3039c43850eb7cee9129b1189790
parentceeaf77f697976960b11619a821ef5f6430906ec
more generalized javascript_renderData

- handles json/jsonp transparently (avoiding code duplication in templates)
- use php's internal json_encode functions (with JSON_UNESCAPED_UNICODE
  for backward compatibility)
- be more liberal with what is allowed as a callback identifier
- return a 400 for illegal callbacks
- return application/javascript type when jsonp is requested

fixes #16, fixes #17
lib/lib.php
lib/template/address-json.php
lib/template/address-jsonv2.php
lib/template/search-json.php
lib/template/search-jsonv2.php