replace links and images when converting content to plaintext