11cb0ef41Sopenharmony_ci.Dd August 9, 2013
21cb0ef41Sopenharmony_ci.Dt cssesc 1
31cb0ef41Sopenharmony_ci.Sh NAME
41cb0ef41Sopenharmony_ci.Nm cssesc
51cb0ef41Sopenharmony_ci.Nd escape text for use in CSS string literals or identifiers
61cb0ef41Sopenharmony_ci.Sh SYNOPSIS
71cb0ef41Sopenharmony_ci.Nm
81cb0ef41Sopenharmony_ci.Op Fl i | -identifier Ar string
91cb0ef41Sopenharmony_ci.br
101cb0ef41Sopenharmony_ci.Op Fl s | -single-quotes Ar string
111cb0ef41Sopenharmony_ci.br
121cb0ef41Sopenharmony_ci.Op Fl d | -double-quotes Ar string
131cb0ef41Sopenharmony_ci.br
141cb0ef41Sopenharmony_ci.Op Fl w | -wrap Ar string
151cb0ef41Sopenharmony_ci.br
161cb0ef41Sopenharmony_ci.Op Fl e | -escape-everything Ar string
171cb0ef41Sopenharmony_ci.br
181cb0ef41Sopenharmony_ci.Op Fl v | -version
191cb0ef41Sopenharmony_ci.br
201cb0ef41Sopenharmony_ci.Op Fl h | -help
211cb0ef41Sopenharmony_ci.Sh DESCRIPTION
221cb0ef41Sopenharmony_ci.Nm
231cb0ef41Sopenharmony_ciescapes strings for use in CSS string literals or identifiers while generating the shortest possible valid ASCII-only output.
241cb0ef41Sopenharmony_ci.Sh OPTIONS
251cb0ef41Sopenharmony_ci.Bl -ohang -offset
261cb0ef41Sopenharmony_ci.It Sy "-s, --single-quotes"
271cb0ef41Sopenharmony_ciEscape any occurences of ' in the input string as \\', so that the output can be used in a CSS string literal wrapped in single quotes.
281cb0ef41Sopenharmony_ci.It Sy "-d, --double-quotes"
291cb0ef41Sopenharmony_ciEscape any occurences of " in the input string as \\", so that the output can be used in a CSS string literal wrapped in double quotes.
301cb0ef41Sopenharmony_ci.It Sy "-w, --wrap"
311cb0ef41Sopenharmony_ciMake sure the output is a valid CSS string literal wrapped in quotes. The type of quotes can be specified using the
321cb0ef41Sopenharmony_ci.Ar -s | --single-quotes
331cb0ef41Sopenharmony_cior
341cb0ef41Sopenharmony_ci.Ar -d | --double-quotes
351cb0ef41Sopenharmony_cisettings.
361cb0ef41Sopenharmony_ci.It Sy "-e, --escape-everything"
371cb0ef41Sopenharmony_ciEscape all the symbols in the output, even printable ASCII symbols.
381cb0ef41Sopenharmony_ci.It Sy "-v, --version"
391cb0ef41Sopenharmony_ciPrint cssesc's version.
401cb0ef41Sopenharmony_ci.It Sy "-h, --help"
411cb0ef41Sopenharmony_ciShow the help screen.
421cb0ef41Sopenharmony_ci.El
431cb0ef41Sopenharmony_ci.Sh EXIT STATUS
441cb0ef41Sopenharmony_ciThe
451cb0ef41Sopenharmony_ci.Nm cssesc
461cb0ef41Sopenharmony_ciutility exits with one of the following values:
471cb0ef41Sopenharmony_ci.Pp
481cb0ef41Sopenharmony_ci.Bl -tag -width flag -compact
491cb0ef41Sopenharmony_ci.It Li 0
501cb0ef41Sopenharmony_ci.Nm
511cb0ef41Sopenharmony_cisuccessfully escaped the given text and printed the result.
521cb0ef41Sopenharmony_ci.It Li 1
531cb0ef41Sopenharmony_ci.Nm
541cb0ef41Sopenharmony_ciwasn't instructed to escape anything (for example, the
551cb0ef41Sopenharmony_ci.Ar --help
561cb0ef41Sopenharmony_ciflag was set); or, an error occurred.
571cb0ef41Sopenharmony_ci.El
581cb0ef41Sopenharmony_ci.Sh EXAMPLES
591cb0ef41Sopenharmony_ci.Bl -ohang -offset
601cb0ef41Sopenharmony_ci.It Sy "cssesc 'foo bar baz'"
611cb0ef41Sopenharmony_ciPrint an escaped version of the given text.
621cb0ef41Sopenharmony_ci.It Sy echo\ 'foo bar baz'\ |\ cssesc
631cb0ef41Sopenharmony_ciPrint an escaped version of the text that gets piped in.
641cb0ef41Sopenharmony_ci.El
651cb0ef41Sopenharmony_ci.Sh BUGS
661cb0ef41Sopenharmony_cicssesc's bug tracker is located at <https://github.com/mathiasbynens/cssesc/issues>.
671cb0ef41Sopenharmony_ci.Sh AUTHOR
681cb0ef41Sopenharmony_ciMathias Bynens <https://mathiasbynens.be/>
691cb0ef41Sopenharmony_ci.Sh WWW
701cb0ef41Sopenharmony_ci<https://mths.be/cssesc>
71