magento-coding-standard
magento-coding-standard copied to clipboard
Rector rule added to escape unsafe output in phtml files
Summary
Often a codebase is handed over to you which does not follow all magento standards and phpcs starts flagging them. One such example is unsafe output in template files. For a large number of files, its cumbersome to refactor these files. Rector rule can do this quickly. This pull requests addresses that.
Checks done.
Added test cases for the rector rule. Ran it on actual template files
Things not covered
This does not yet implement escapeJs and escapeUrl functions. Should be able to add it soon. This PR should also help people to get started with writing such rules.