Possible ways to encode below url and decode it in user view
$("#search-box1").append('<a href="?r=user/userProfile&id='+res.status[i].id +'">
<img style="border-radius:5px 5px 5px 5px;border:2px solid #ddd ;width:55px; height:50px; float:left; margin-left:3px; " src="<?php echo Yii::app()->request->baseUrl;?>/images/user/originalImage/tn150/'+res.status[i].profile_picture+'"/>
</a>');