Skip to content

Commit

Permalink
Merge pull request #61 from TheDMSGroup/PA-3-xml-template-dissapears
Browse files Browse the repository at this point in the history
[PA-3] Prevent XML from being cleaned upon save.
  • Loading branch information
heathdutton authored Apr 17, 2018
2 parents 481a00b + ee006eb commit d43930c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ env:
# The exact plugin folder/bundle name.
- "MAUTIC_PLUGIN=MauticContactClientBundle"

dist: trusty
dist: precise

language: php

Expand Down
6 changes: 4 additions & 2 deletions Form/Type/ContactClientType.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

namespace MauticPlugin\MauticContactClientBundle\Form\Type;

use Mautic\CoreBundle\Form\EventListener\CleanFormSubscriber;
// use Mautic\CoreBundle\Form\EventListener\CleanFormSubscriber;
use Mautic\CoreBundle\Form\EventListener\FormExitSubscriber;
use Mautic\CoreBundle\Security\Permissions\CorePermissions;
use MauticPlugin\MauticContactClientBundle\Constraints\JsonArray;
Expand Down Expand Up @@ -46,7 +46,9 @@ public function __construct(CorePermissions $security)
*/
public function buildForm(FormBuilderInterface $builder, array $options)
{
$builder->addEventSubscriber(new CleanFormSubscriber(['website' => 'url']));
// CleanFormSubscriber causes JSON payloads containing XML to be purged :(
// @todo - We may have to run clean on individual fields instead.
// $builder->addEventSubscriber(new CleanFormSubscriber(['website' => 'url']));
$builder->addEventSubscriber(new FormExitSubscriber('contactclient', $options));

$builder->add(
Expand Down

0 comments on commit d43930c

Please sign in to comment.