You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@esme.apache.org by dh...@apache.org on 2009/03/19 00:02:04 UTC

svn commit: r755770 - /incubator/esme/trunk/server/src/main/webapp/templates-hidden/message.html

Author: dhague
Date: Wed Mar 18 23:02:04 2009
New Revision: 755770

URL: http://svn.apache.org/viewvc?rev=755770&view=rev
Log:
Moved escaped HTML markup from JavaScript into the HTML body as HTML.

Modified:
    incubator/esme/trunk/server/src/main/webapp/templates-hidden/message.html

Modified: incubator/esme/trunk/server/src/main/webapp/templates-hidden/message.html
URL: http://svn.apache.org/viewvc/incubator/esme/trunk/server/src/main/webapp/templates-hidden/message.html?rev=755770&r1=755769&r2=755770&view=diff
==============================================================================
--- incubator/esme/trunk/server/src/main/webapp/templates-hidden/message.html (original)
+++ incubator/esme/trunk/server/src/main/webapp/templates-hidden/message.html Wed Mar 18 23:02:04 2009
@@ -60,11 +60,12 @@
                 // Put the marshalled data into a copy of the template
                 var newMsg = msgTemplate.clone(true).attr('id',msgId);
 
-                var author = newMsg.find('#author');
-                author.html('<div>' + msgAuthor.nickname + '</div>');
-                author.prepend('<img src="' + msgAuthor.imageurl +
-                                  '" alt="' + msgAuthor.firstname +
-                                        ' ' + msgAuthor.lastname + '" width="50px"/>');
+                newMsg.find('#author').text(msgAuthor.nickname);
+
+                var avatar = newMsg.find('#avatar')
+                        .attr('src', msgAuthor.imageurl)
+                        .attr('alt',msgAuthor.firstname + ' ' + msgAuthor.lastname);
+
                 newMsg.find('#body').html(msgBody);
                 newMsg.find('#source').text(msgSource);
                 newMsg.find('#when').text(msgDateStr);
@@ -127,7 +128,9 @@
                         <lift:comet type="Timeline"/>
                         <tbody id="timeline_messages">
                           <tr id="message">
-                              <td id="author">dhague</td>
+<!--                              <td><img id="msgAuthor" src="" alt="" width="50px"/><div id="author">dhague</div></td>
+-->
+                              <td><img id="avatar" src="http://www.chinposin.com/avatars/twitter_vdichev2008-08-25-18-40-11_100.jpg" alt="Darren S. Hague" width="50px"/><div id="author">dhague</div></td>
                               <td class="message">
                                 <div class="outer"><div class="inner clear">
                                     <p class="text" id="body">This is a test message in the HTML for designers.</p>