browse.py: use html.escape for python3

fixes #1741
fixes #1736

Cherry-picked from
https://github.com/ninja-build/ninja/commit/4d744de3eed19af8c8c1094637a044747c297934

Test: ninja ... -t browse with python3
Bug: 187784045
Change-Id: Ic6bd8b6eb08f68058712acf325be88ebb69831c7
1 file changed