New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to [item ...] to escape characters for JSON output. #4324

Closed
sdlime opened this Issue May 25, 2012 · 5 comments

Comments

Projects
None yet
3 participants
@sdlime
Member

sdlime commented May 25, 2012

It would be handy be able to escape strings specifically for JSON output in templates. This means the [item ...] tag for the most part. For example, newlines become \n and so on... I don't believe existing escape options (NONE, HTML, URL) are sufficient.

Steve

@sdlime

This comment has been minimized.

Member

sdlime commented May 25, 2012

As an example see PHP's json_encode: http://us2.php.net/manual/en/function.json-encode.php.

@tbonfort

This comment has been minimized.

Member

tbonfort commented Aug 8, 2013

too late for 6.4, demilestoning

@mapserver-bot

This comment has been minimized.

mapserver-bot commented Feb 23, 2016

This is an automated comment

This issue has been closed due to lack of activity. This doesn't mean the issue is invalid, it simply got no attention within the last year. Please reopen with missing/relevant information if still valid.

Typically, issues fall in this state for one of the following reasons:

  • Hard, impossible or not enough information to reproduce
  • Missing test case
  • Lack of a champion with interest and/or funding to address the issue
@sdlime

This comment has been minimized.

Member

sdlime commented Feb 23, 2016

I'd like to address this one in 7.2. I believe the escape function already exists (for GEOJSON output), just need to edit maptemplate.c to use it. --Steve

sdlime added a commit that referenced this issue Jul 26, 2016

Merge pull request #5303 from sdlime/ticket-4324
Added option to item take to escape strings for JSON output. #4324
@sdlime

This comment has been minimized.

Member

sdlime commented Jul 26, 2016

Pull request merged. Will need to open a separate documentation ticket. Closing... --Steve

@sdlime sdlime closed this Jul 26, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment