Turned out it's not fixing the original issue. For more details see the comments on that issue.
@tsteur and @sgiehl I found something interesting with this
action_name while I was writing a test.
I modified back my changes to see the test a made is failing, but it's not. So I checked and we already trim the action name, but not there where I modified the code.
So this couldn't be the original issue. I can add the tests and not modifying the code, so we will see actually it is trimmed.
But then what was the issue for the user?
@flamisz Had a closer look at the code myself now and it seems the action name is trimmed in all cases already. I guess there are actually no changes needed. Will comment the original issue as well.
Merging this one as an additional test can't hurt ;-)