Pacman database files replaced with html files

There is a recent and yet unresolved thread with similar issue:

There is a rather old but solved thread at:
https://bbs.archlinux.org/viewtopic.php?id=135310