Fixed bug where link content was rewritten even if it contained other nodes than texts (images, etc)