After wasting a lot of time with character variables and mysql configurations, I fixed the problem with a simple solution that is
Passing the input string through
base64_encode and later using
base64_decode to show them worked in this case. However the strings take up more space than earlier but this solution is really simple and worthy.
I just posted this question to know if someone ever faced something similar but people really do not get the main point of the question. That is where the people on SO get really exhausting. Anyways thanks for your help people! 🙂
$content = base64_encode(nl2br($this->common->nohtml($this->input->post("content"))));
<?php echo base64_decode ($r->content) ?> <?php if($r->site_flag) : ?> <?php $sites = $this->feed_model->get_feed_urls($r->ID); ?> <?php foreach($sites->result() as $site) : ?> <div class="feed-url-spot clearfix"> <div class="pull-left feed-url-spot-image"> <?php if($site->image) : ?> <img src="<?php echo $site->image ?>" width="100%"> <?php endif; ?> </div> <p><a href="<?php echo $site->url ?>"><?php echo $site->title ?></a></p> <p><?php echo $site->description ?></p> </div> <?php endforeach; ?> <?php endif; ?>