Update on the issue, I have deducted that this following line causes all the fuzz:
<?php echo get_the_category_list( _x( ' ', 'Used between list items, there is a space after the comma.', 'twentyfourteen' ) ); ?>
Now I have tested this line inside <!-- -->
and it works well, it returns for example: <!-- <a href="https://localhost/category/news/" rel="category tag">News</a> -->
which means it returns what it needs too. But once it’s inside the code, it scrambles everything with an unexplained reason.
Any known problems with echo in specific?
Thanks