Skip to content
This repository was archived by the owner on May 13, 2026. It is now read-only.

mozilla-services/restify-safe-json-formatter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

45 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A restify formatter that unicode escapes <, >, & as \u003c, \u003e, \u0026 respectively to keep some browsers from misinterpreting it as HTML.

Usage:

var restify = require('restify');
var safeJsonFormatter = require('restify-safe-json-formatter');

var server = restify.createServer({
  formatters: {
    'application/json; q=0.9': safeJsonFormatter
  }
});

See also: the example server

About

DEPRECATED - A restify formatter that unicode escapes <, >, & as \u003c, \u003e, \u0026 respectively to keep some browsers from misinterpreting it as HTML.

Topics

Resources

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors