Commit 1c180ffc authored by tobyink's avatar tobyink

Profile encoding issues.

parent d475fd9f
......@@ -50,7 +50,7 @@ class User {
$res = $mdb2->query('SELECT * FROM Users WHERE ' . 'username = ' . $mdb2->quote($name, 'text'));
if($res->numRows()) {
$row = sanitize($res->fetchRow(MDB2_FETCHMODE_ASSOC));
$this->name = $row['username'];
$this->email = $row['email'];
$this->fullname = $row['fullname'];
......
{include file='header.tpl'}
<h2 property="dc:title">{$user}'{if $user|substr:-1 != 's'}s{/if} profile</h2>
<div about="{$id}" typeof="foaf:Agent" class="user vcard">
<h2 property="dc:title">{$user|escape:'html':'UTF-8'}'{if $user|substr:-1 != 's'}s{/if} profile</h2>
<div about="{$id|escape:'html':'UTF-8'}" typeof="foaf:Agent" class="user vcard">
<div class="avatar" rel="foaf:depiction">
<!-- Avatar placeholder -->
<img src="{$avatar|htmlentities}" alt="avatar" class="photo" />
<img src="{$avatar|escape:'html':'UTF-8'}" alt="avatar" class="photo" />
</div>
{if $isme}
......@@ -14,10 +14,10 @@
<dl>
<dt>
<span class="fn" property="foaf:name">{$fullname}</span>
<span class="fn" property="foaf:name">{$fullname|escape:'html':'UTF-8'}</span>
<span rel="foaf:holdsAccount" rev="sioc:account_of">
<span about="{$acctid}" typeof="sioc:User">
(<span class="nickname" property="foaf:accountName">{$user}</span>)
<span about="{$acctid|escape:'html':'UTF-8'}" typeof="sioc:User">
(<span class="nickname" property="foaf:accountName">{$user|escape:'html':'UTF-8'}</span>)
<span rel="foaf:accountServiceHomepage" resource="{$base_url}"></span>
<span rel="foaf:accountHomepage" rev="foaf:topic" resource=""></span>
</span>
......@@ -25,13 +25,13 @@
</dt>
{if $homepage}
<dd>
<a href="{$homepage}" rel="me foaf:homepage" rev="foaf:primaryTopic" class="url">{$homepage}</a>
<a href="{$homepage|escape:'html':'UTF-8'}" rel="me foaf:homepage" rev="foaf:primaryTopic" class="url">{$homepage|escape:'html':'UTF-8'}</a>
</dd>
{/if}
<dd rel="foaf:based_near">
<span{if $location_uri} about="{$location_uri}"{/if} class="label" property="rdfs:comment">{$location}</span>
<span{if $location_uri} about="{$location_uri|escape:'html':'UTF-8'}"{/if} class="label" property="rdfs:comment">{$location|escape:'html':'UTF-8'}</span>
</dd>
<dd class="note" property="bio:olb">{$bio}</dd>
<dd class="note" property="bio:olb">{$bio|escape:'html':'UTF-8'}</dd>
</dl>
<hr style="border: 1px solid transparent; clear: both;" rel="foaf:page" rev="foaf:primaryTopic" resource="" />
......@@ -43,33 +43,33 @@
<!-- We should try to make this list work like the gobbles list. -->
<dl class='now-playing'>
{section name=i loop=$nowplaying}
<dt class='track-name'>{$nowplaying[i].track|htmlentities}</dt>
<dd>by <span class='artist-name'><a href='{$nowplaying[i].artisturl}'>{$nowplaying[i].artist|htmlentities}</a></span></dd>
<dd>with <span class='gobbler'>{$nowplaying[i].clientstr}</span></dd>
<dt class='track-name'>{$nowplaying[i].track|escape:'html':'UTF-8'}</dt>
<dd>by <span class='artist-name'><a href='{$nowplaying[i].artisturl|escape:'html':'UTF-8'}'>{$nowplaying[i].artist|escape:'html':'UTF-8'}</a></span></dd>
<dd>with <span class='gobbler'>{$nowplaying[i].clientstr|escape:'html':'UTF-8'}</span></dd>
{/section}
</dl>
{/if}
<h3>Latest {$scrobbles|@count} Plays:</h3>
<ul class="gobbles" about="{$id}" rev="gob:user">
<ul class="gobbles" about="{$id|escape:'html':'UTF-8'}" rev="gob:user">
{section name=i loop=$scrobbles}
<li about="{$scrobbles[i].id}" typeof="gob:ScrobbleEvent" rel="gob:track_played">
<div about="{$scrobbles[i].id_track}" typeof="mo:Track" class="haudio">
<li about="{$scrobbles[i].id|escape:'html':'UTF-8'}" typeof="gob:ScrobbleEvent" rel="gob:track_played">
<div about="{$scrobbles[i].id_track|escape:'html':'UTF-8'}" typeof="mo:Track" class="haudio">
<div rev="mo:track">
<div about="{$scrobbles[i].id_album}" typeof="mo:Record"{if $scrobbles[i].album} property="dc:title" content="{$scrobbles[i].album|htmlentities}"{/if}>
{if $scrobbles[i].albumurl}<a rel="foaf:page" href="{$scrobbles[i].albumurl}">{/if}
<span{if $scrobbles[i].album_image != '/i/qm50.png'} rel="foaf:depiction"{/if}{if $scrobbles[i].albumurl} about="{$scrobbles[i].id_album}"{/if}>
<img height="50" width="50" src="{$scrobbles[i].album_image}" class="albumart{if $scrobbles[i].album_image != '/i/qm50.png'} photo{/if}" {if $scrobbles[i].album}title="{$scrobbles[i].album|htmlentities}" alt="Album: {$scrobbles[i].album|htmlentities}"{else}alt="Unknown album"{/if} />
<div about="{$scrobbles[i].id_album|escape:'html':'UTF-8'}" typeof="mo:Record"{if $scrobbles[i].album} property="dc:title" content="{$scrobbles[i].album|escape:'html':'UTF-8'}"{/if}>
{if $scrobbles[i].albumurl}<a rel="foaf:page" href="{$scrobbles[i].albumurl|escape:'html':'UTF-8'}">{/if}
<span{if $scrobbles[i].album_image != '/i/qm50.png'} rel="foaf:depiction"{/if}{if $scrobbles[i].albumurl} about="{$scrobbles[i].id_album|escape:'html':'UTF-8'}"{/if}>
<img height="50" width="50" src="{$scrobbles[i].album_image|escape:'html':'UTF-8'}" class="albumart{if $scrobbles[i].album_image != '/i/qm50.png'} photo{/if}" {if $scrobbles[i].album}title="{$scrobbles[i].album|escape:'html':'UTF-8'}" alt="Album: {$scrobbles[i].album|escape:'html':'UTF-8'}"{else}alt="Unknown album"{/if} />
</span>
{if $scrobbles[i].albumurl}</a>{/if}
</div>
</div>
<div rel="foaf:maker" class="contributor vcard">
<a about="{$scrobbles[i].id_artist}" typeof="mo:MusicArtist" property="foaf:name" rel="foaf:page"
class="fn url" href="{$scrobbles[i].artisturl}"
>{$scrobbles[i].artist|htmlentities}</a>
<a about="{$scrobbles[i].id_artist|escape:'html':'UTF-8'}" typeof="mo:MusicArtist" property="foaf:name" rel="foaf:page"
class="fn url" href="{$scrobbles[i].artisturl|escape:'html':'UTF-8'}"
>{$scrobbles[i].artist|escape:'html':'UTF-8'}</a>
</div>
<div><a class="fn" property="dc:title" rel="foaf:page" href="{$scrobbles[i].trackurl}">{$scrobbles[i].track|htmlentities}</a></div>
<small about="{$scrobbles[i].id}" property="dc:date" content="{$scrobbles[i].timeiso}" datatype="xsd:dateTime">{$scrobbles[i].timehuman}</small>
......@@ -85,7 +85,7 @@
<ul class="tagcloud" about="{$id}">
{section name=i loop=$user_tagcloud}
<li style="font-size:{$user_tagcloud[i].size}"><a
href="{$user_tagcloud[i].pageurl}" rel="{if $user_tagcloud[i].size|substr:-5 ==
href="{$user_tagcloud[i].pageurl|escape:'html':'UTF-8'}" rel="{if $user_tagcloud[i].size|substr:-5 ==
'large'}foaf:interest {/if}tag">{$user_tagcloud[i].artist|escape:"html":"UTF-8"}</a></li>
{/section}
</ul>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment