Skip to content

Instantly share code, notes, and snippets.

View fcardinaux's full-sized avatar

François Cardinaux fcardinaux

  • Geneva, Switzerland
View GitHub Profile
@fcardinaux
fcardinaux / filter_escapejson.erl
Created December 28, 2011 10:26
Suggestion for Zotonic: a filter to escape strings for JSON output
%% @author François Cardinaux, inspired by Marc Worrell's filter_escapejs module
%% and z_utils:json_escape/1 function
%% @copyright 2011 François Cardinaux
%% @doc Zotonic filter to escape strings as specified on http://www.json.org/
%% Copyright 2011 François Cardinaux
%%
%% Licensed under the Apache License, Version 2.0 (the "License");
%% you may not use this file except in compliance with the License.
%% You may obtain a copy of the License at