Correctly encode confirm handlers

With encode set to false the onclick handler will be sent through
h() regardless, making links and postLinks work again.
Merge pull request #1512 from aleho/2.4

Correctly encode confirm handlers