Skip to content
This repository has been archived by the owner on Apr 26, 2020. It is now read-only.

Remove controls characters from input HTML #14

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions phpQuery/phpQuery.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
*/
abstract class phpQuery {
/**
* XXX: Workaround for mbstring problems
*
* XXX: Workaround for mbstring problems
*
* @var bool
*/
public static $mbstringSupport = true;
Expand Down Expand Up @@ -270,6 +270,7 @@ public static function getDocument($id = null) {
public static function newDocument($markup = null, $contentType = null) {
if (! $markup)
$markup = '';
$markup = preg_replace('/[\x00-\x1F\x7F]/', '', $markup);
$documentID = phpQuery::createDocumentWrapper($markup, $contentType);
return new phpQueryObject($documentID);
}
Expand Down