]> 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 13:55:26 +0000 (15:55 +0200)
commit1cb55c6e318cb86cd1d44463eff4b951496134c0
tree77f3da82cb316c7b03cf80e6fa38a9a7d34e0afc
parent8ff0aabaf3e82e6bc99894e22d312ccc4b76529f
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