Skip to content

Instantly share code, notes, and snippets.

@DracoBlue
Created May 21, 2012 10:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DracoBlue/2761611 to your computer and use it in GitHub Desktop.
Save DracoBlue/2761611 to your computer and use it in GitHub Desktop.
Index: libs/agavi/validator/AgaviStringValidator.class.php
===================================================================
--- libs/agavi/validator/AgaviStringValidator.class.php (revision 329)
+++ libs/agavi/validator/AgaviStringValidator.class.php (working copy)
@@ -85,10 +85,12 @@
return false;
}
+ /* To fix the: 'non SGML character number 11' issue. */
+ $originalValue = preg_replace('/[\x1-\x8\xB-\xC\xE-\x1F]/', '', $originalValue);
$this->export($originalValue);
return true;
}
}
-?>
\ No newline at end of file
+?>
Index: libs/agavi/filter/AgaviFormPopulationFilter.class.php
===================================================================
--- libs/agavi/filter/AgaviFormPopulationFilter.class.php (revision 329)
+++ libs/agavi/filter/AgaviFormPopulationFilter.class.php (working copy)
@@ -513,6 +513,9 @@
}
}
+ /* To fix the: 'non SGML character number 11' issue. */
+ $value = preg_replace('/[\x1-\x8\xB-\xC\xE-\x1F]/', '', $value);
+
if($element->nodeName == 'input') {
$inputType = $element->getAttribute('type');
@@ -1051,4 +1054,4 @@
}
}
-?>
\ No newline at end of file
+?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment