private function ForwardForm::cleanString in Forward 8
Same name and namespace in other branches
- 8.3 src/Form/ForwardForm.php \Drupal\forward\Form\ForwardForm::cleanString()
- 8.2 src/Form/ForwardForm.php \Drupal\forward\Form\ForwardForm::cleanString()
- 4.x src/Form/ForwardForm.php \Drupal\forward\Form\ForwardForm::cleanString()
- 4.0.x src/Form/ForwardForm.php \Drupal\forward\Form\ForwardForm::cleanString()
Clean a string
1 call to ForwardForm::cleanString()
- ForwardForm::getToken in src/
Form/ ForwardForm.php - Get a token
File
- src/
Form/ ForwardForm.php, line 196
Class
- ForwardForm
- Forward a page to a friend
Namespace
Drupal\forward\FormCode
private function cleanString($string) {
// Strip embedded URLs
$string = preg_replace('|https?://www\\.[a-z\\.0-9]+|i', '', $string);
$string = preg_replace('|www\\.[a-z\\.0-9]+|i', '', $string);
return $string;
}