sonata-project / exporter

Lightweight Exporter library
https://docs.sonata-project.org/projects/exporter
MIT License
437 stars 88 forks source link

XMLExporter does not sanitize tags #154

Closed Kaijiro closed 4 years ago

Kaijiro commented 7 years ago

Environment

Sonata packages

$ composer show sonata-project/*
sonata-project/admin-bundle              3.13.0 The missing Symfony Admin Generator
sonata-project/block-bundle              3.3.0  Symfony SonataBlockBundle
sonata-project/cache                     1.0.7  Cache library
sonata-project/cache-bundle              2.3.1  This bundle provides caching services
sonata-project/classification-bundle     3.3.0  Symfony SonataClassificationBundle
sonata-project/core-bundle               3.3.0  Symfony SonataCoreBundle
sonata-project/dashboard-bundle          0.1.0  Provides a Dashboard management through container and block services
sonata-project/datagrid-bundle           2.2.1  Symfony SonataDatagridBundle
sonata-project/doctrine-extensions       1.0.2  Doctrine2 behavioral extensions
sonata-project/doctrine-orm-admin-bundle 3.1.3  Symfony Sonata / Integrate Doctrine ORM into the SonataAdminBundle
sonata-project/easy-extends-bundle       2.1.10 Symfony SonataEasyExtendsBundle
sonata-project/exporter                  1.7.1  Lightweight Exporter library
sonata-project/formatter-bundle          3.1.0  Symfony SonataFormatterBundle
sonata-project/google-authenticator      1.0.2  Library to integrate Google Authenticator into a PHP project
sonata-project/intl-bundle               2.3.0  Symfony SonataIntlBundle
sonata-project/media-bundle              3.3.1  Symfony SonataMediaBundle
sonata-project/notification-bundle       3.1.0  Symfony SonataNotificationBundle
sonata-project/page-bundle               3.3.0  This bundle provides a Site and Page management through container and block services
sonata-project/seo-bundle                2.1.0  Symfony SonataSeoBundle
sonata-project/user-bundle               3.2.1  Symfony SonataUserBundle

Symfony packages

$ composer show symfony/*
symfony/monolog-bundle     v2.8.0  Symfony MonologBundle
symfony/phpunit-bridge     v3.2.4  Symfony PHPUnit Bridge
symfony/polyfill-apcu      v1.1.0  Symfony polyfill backporting apcu_* functions to lower PHP versions
symfony/polyfill-intl-icu  v1.3.0  Symfony polyfill for intl's ICU-related data and classes
symfony/polyfill-mbstring  v1.3.0  Symfony polyfill for the Mbstring extension
symfony/polyfill-php54     v1.3.0  Symfony polyfill backporting some PHP 5.4+ features to lower PHP versions
symfony/polyfill-php55     v1.3.0  Symfony polyfill backporting some PHP 5.5+ features to lower PHP versions
symfony/polyfill-php56     v1.3.0  Symfony polyfill backporting some PHP 5.6+ features to lower PHP versions
symfony/polyfill-php70     v1.3.0  Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions
symfony/polyfill-util      v1.3.0  Symfony utilities for portability of PHP codes
symfony/security-acl       v3.0.0  Symfony Security Component - ACL (Access Control List)
symfony/security-bundle    v2.3.0  Symfony SecurityBundle
symfony/swiftmailer-bundle v2.4.2  Symfony SwiftmailerBundle
symfony/symfony            v2.8.17 The Symfony PHP framework
symfony/var-dumper         v3.2.3  Symfony mechanism for exploring and dumping PHP variables

PHP version

$ php -v
PHP 7.0.19-1+deb.sury.org~xenial+1 (cli) (built: May 11 2017 14:06:14) ( NTS )
Copyright (c) 1997-2017 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
    with Xdebug v2.4.1, Copyright (c) 2002-2016, by Derick Rethans
    with Zend OPcache v7.0.19-1+deb.sury.org~xenial+1, Copyright (c) 1999-2017, by Zend Technologies

Subject

When using XMLExporter (in SonataAdmin in my case), I had to create a custom implementation of SourceIteratorInterface in order to export the fields I want (many levels of nested entities where involved).

I'm using translated messages as key in my Iterator and those messages sometimes contains spaces. The mainly used export is the CSV, so spaces are not really a problem in the header, but sometimes my users use the XML export and spaces in tags should not be present (they should be converted to underscores or maybe an other character).

stale[bot] commented 4 years ago

Is this still relevant? If so, what is blocking it? Is there anything you can do to help move it forward?

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.