Bläddra i källkod

[Form] Removed StripTagsListener. Its implementation is insufficient and needs to be replaced by a better one.

The current implementation does not sanitize HTML properly. See [1] and [2] for more information.

[1] https://github.com/padraic/wibble
[2] http://blog.astrumfutura.com/?s=html+sanitising
Bernhard Schussek 14 år sedan
förälder
incheckning
abb0d0cde1
1 ändrade filer med 0 tillägg och 34 borttagningar
  1. 0 34
      src/Symfony/Component/Form/EventListener/StripTagsListener.php

+ 0 - 34
src/Symfony/Component/Form/EventListener/StripTagsListener.php

@@ -1,34 +0,0 @@
-<?php
-
-/*
- * This file is part of the Symfony package.
- *
- * (c) Fabien Potencier <fabien.potencier@symfony-project.com>
- *
- * For the full copyright and license information, please view the LICENSE
- * file that was distributed with this source code.
- */
-
-namespace Symfony\Component\Form\EventListener;
-
-use Symfony\Component\Form\Events;
-use Symfony\Component\Form\Event\FilterDataEvent;
-use Symfony\Component\EventDispatcher\EventSubscriberInterface;
-
-/**
- * Strip tags from incoming input.
- *
- * @author Benjamin Eberlei <kontakt@beberlei.de>
- */
-class StripTagsListener implements EventSubscriberInterface
-{
-    public function onBindClientData(FilterDataEvent $event)
-    {
-        $event->setData(strip_tags($event->getData()));
-    }
-
-    public static function getSubscribedEvents()
-    {
-        return Events::onBindClientData;
-    }
-}