symfony2admingenerator / GeneratorBundle

Admingenerator for Symfony. Parse YAML files to build customized backend.
MIT License
67 stars 29 forks source link

Slashes are stripped where they should not be. #243

Closed tobias-93 closed 8 years ago

tobias-93 commented 8 years ago

The stripslashes in https://github.com/symfony2admingenerator/GeneratorBundle/blob/master/Twig/Extension/EchoExtension.php#L64 causes slashes to be stripped in strings where they should be kept (for instance in a string with apostrophes). This can cause a string to be terminated too early, causing syntax errors. @sescandell any thoughts on a better way? This is too rigorous.

sescandell commented 8 years ago

Do you have any sample so we can add it to the tests?

Thanks,

tobias-93 commented 8 years ago
  params:
    fields:
      name:
        formOptions:
          label: "How 'ya doing?"

This could be used in the no_modifications string to be tested. Mark the double quotes versus the single quote.

sescandell commented 8 years ago

:+1:

sescandell commented 8 years ago

@tobias-93 Let me know if this is better now,

tobias-93 commented 8 years ago

@sescandell Yes, thank you!

sescandell commented 8 years ago

Actually it's not OK, a commit is coming