Replace [ and ] characters in aliases with underscores for nested fields

With a YAML field of `defaultOptions[images]`, `$this->getEventHandler('onRemoveAttachment')` returns *formDefaultOptions[images]::onRemoveAttachment* which is invalid and just results in a Javascript error. This PR fixes the field alias so it uses underscores instead of [ and ].

[Demonstration repo](https://github.com/Flynsarmy/oc-badfileupload-plugin)