33 lines
539 B
Plaintext
33 lines
539 B
Plaintext
include::../description.adoc[]
|
|
|
|
== Noncompliant Code Example
|
|
|
|
[source,php]
|
|
----
|
|
$data = $_GET["data"];
|
|
error_log($data); // Noncompliant
|
|
----
|
|
|
|
== Compliant Solution
|
|
|
|
[source,php]
|
|
----
|
|
$data = $_GET["data"];
|
|
$badchars = array("\n", "\r", "\t");
|
|
$safedata = str_replace($badchars, "", $data);
|
|
error_log($safedata);
|
|
----
|
|
|
|
include::../see.adoc[]
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
include::../message.adoc[]
|
|
|
|
include::../highlighting.adoc[]
|
|
|
|
endif::env-github,rspecator-view[]
|