Please use one topic for only one question.
Hi. Try replace <?php echo the_content(); ?> with <?php echo esc_html(the_content()); ?> Thanks.