nothing seemed to work, I reinstalled the wordpress from database backups and wp-contents folder. works perfectly now. I still have no idea on what was the problem though. Gutmann-wiped the erroneus files and database backups. I hope it never happens again.
I tried disabling all plugins, didn’t work.
Thanks for your reply. URL’s are OK, they are displayed in posts or direct links if embedded manually.
777 didn’t solve it either.