Why do comments appear like this?

Feb 6, 2011 at 3:32 PM

"very interesting blog keep it up found it really useful <img src="/editors/tiny_mce_3_3_9_2/plugins/emotions/img/smiley-smile.gif" class="flag" alt="Smile" /> "

 

Shouldn't the code automatically turn into a smiley?

Feb 7, 2011 at 5:05 PM

Bump

Feb 8, 2011 at 4:54 PM

Please, i cant get this to go away

Feb 8, 2011 at 7:58 PM
Edited Feb 8, 2011 at 8:02 PM

How is this being put in the comments section?  Are you pasting "<img src="/editors/tiny_mce_3_3_9_2/plugins/emotions/img/smiley-smile.gif" class="flag" alt="Smile" />" into the comments text box?  If so, it is being seen as text not html code and the beginning and ending <> are being converted to their html equivalent &lt; and &gt; .

So, if you do a view source in firefoxt you will see &lt;img src="/editors/tiny_mce_3_3_9_2/plugins/emotions/img/smiley-smile.gif" class="flag" alt="Smile" /&gt;

I do not know how to get around this.

Feb 9, 2011 at 11:05 PM

No, i did not paste that code. All i entered was " :) " and it got change to that code.

 

Thanks

Feb 10, 2011 at 4:24 PM

Bump

Feb 10, 2011 at 9:00 PM

Well....I just learned something new.  I didn't know you could do that.  I tested it on my 2 sites as well as a couple of others and it work on all.  What happens if you temporarily change your theme and try it?  Does it then work? 

Here is my guess.  Using firebug I was able to get the image to show rather than code.

You have:

<textarea readonly="readonly">
<img src="/editors/tiny_mce_3_3_9_2/plugins/emotions/img/smiley-smile.gif" class="flag" alt="Smile" />
</textarea>

Get rid of the readonly="readonly".  When I did that the image shows

Feb 10, 2011 at 9:04 PM

 

By the way....give folks a link to follow so they can see it in action.

Feb 11, 2011 at 7:34 PM

Here is a link.

http://muscletitans.com/post/2011/02/06/Basics-Bodybuilding-Diet.aspx

 

I changed

 

<div class="commentBox"><textarea readonly="readonly"><%= ResolveLinks(Comment.Content) %></textarea> </div>

 

to

 

<div class="commentBox"><textarea "><%= ResolveLinks(Comment.Content) %></textarea> </div>

 

In the CommentView.ascx but it still doesnt work.

 

Thanks

Feb 11, 2011 at 9:04 PM

Ok.  I just went to you link and I am still seeing the below:

<div class="commentBox">
<textarea readonly="readonly">very interesting blog keep it up found it really useful &lt;img src="/editors/tiny_mce_3_3_9_2/plugins/emotions/img/smiley-smile.gif" class="flag" alt="Smile" /&gt;</textarea>
 </div>

In Firebug I edit the html changeing the "textarea" to "content" like:

<div class="commentBox">
<content>very interesting blog keep it up found it really useful &lt;img src="/editors/tiny_mce_3_3_9_2/plugins/emotions/img/smiley-smile.gif" class="flag" alt="Smile" /&gt;</content>
</div>

Now the icon shows. You will need to updated your CSS to account for the name change. Inaddtion you will need to add some CSS to align the emoticon properly

Not sure why it works but it does.
Feb 12, 2011 at 6:32 AM

So i have to change in my asp.net page, the textarea tag to a content tag? What is the difference?

 

Can you please paste the code to the default page? The one that comes with the standard theme? I deleted it, and i need to look at it.

 

Thanks :)

 

(The problem may be that the person who originally made the theme that i built upon changed some tags)

Feb 12, 2011 at 3:05 PM

go to the download tab and get it from there

Feb 12, 2011 at 3:07 PM

by the way,  I did some further testing and I found that changing

<textarea readonly="readyonly">

to

<textarea2 readonly="readyonly">

also worked.

You have something going on with "textarea"  maybe some javascript or ???

Feb 12, 2011 at 4:45 PM
Edited Feb 12, 2011 at 4:46 PM

Here is the full code to the page:

 

<%@ Control Language="C#" EnableViewState="False" Inherits="BlogEngine.Core.Web.Controls.CommentViewBase" %>

<link rel="stylesheet" href="style.css" type="text/css" />

<body>
<div id="id_<%=Comment.Id %>" class="comment">
    <div class="topRow"><%= Comment.Website != null ? "<a href=\"" + Comment.Website + "\">" + Comment.Author + "</a>" : Comment.Author %> wrote:</div>
    <div class="clearer"></div>
    <div class="contentRow">
        <div class="commentBox"><textarea readonly="readonly"><%= ResolveLinks(Comment.Content) %></textarea> </div>
        <div class="gravatar"><%= Gravatar(80)%></div>
        
    </div>
    <div><div class="flag"><%= Flag %> &nbsp</div><div class="author">| <%= ReplyToLink %> <%= AdminLinks %></div><div class="date"> <%= Comment.DateCreated.ToString("MMMM dd yyyy HH:mm") %></div></div>  
    <div class="clearer"></div>  
</div>

<div class="comment-replies"
     id="replies_<%=Comment.Id %>"
     <%= (Comment.Comments.Count == 0) ? " style=\"display:none;\"" : "" %>>
</div>

    <asp:PlaceHolder ID="phSubComments" runat="server" />
 </body>



I dont see any java script, i wonder why it does this.

Feb 12, 2011 at 4:53 PM

Ok i think i found out why. It seems the textbox class can never have an image in it. All i did was simply remove the textbox text and it works now.

 

Thanks bro :)