Fixed a string error in the webclient that could appear on some server setups. Added URL parsing to the webclient.

This commit is contained in:
Griatch 2010-12-07 21:46:26 +00:00
parent e7b3916aec
commit 7e898842b9
4 changed files with 13 additions and 8 deletions

View file

@ -22,9 +22,6 @@ class TelnetProtocol(StatefulTelnetProtocol, session.Session):
communication between game and player goes through here.
"""
# identifier in case one needs to easily separate protocols at run-time.
protocol_key = "telnet"
# telnet-specific hooks
def connectionMade(self):

View file

@ -43,7 +43,7 @@ class LazyEncoder(simplejson.JSONEncoder):
return force_unicode(obj)
return super(LazyEncoder, self).default(obj)
def jsonify(obj):
return simplejson.dumps(obj, ensure_ascii=False, cls=LazyEncoder)
return utils.to_str(simplejson.dumps(obj, ensure_ascii=False, cls=LazyEncoder))
#

View file

@ -13,7 +13,7 @@ import re
import cgi
from src.utils import ansi
class ANSItoHTMLparser(object):
class TextToHTMLparser(object):
"""
This class describes a parser for converting from ansi to html.
"""
@ -124,7 +124,7 @@ class ANSItoHTMLparser(object):
return result
HTML_PARSER = ANSItoHTMLparser()
HTML_PARSER = TextToTMLparser()
#
# Access function

View file

@ -1,15 +1,23 @@
/*
Style sheet for Evennia's web client.
Possibly this should somehow be incoorporated with the
This should possibly somehow be incoorporated with the
overall website theme in the future?
*/
/*Overall element look */
body{
background:#000;
color:#fff;
font-size:.9em;
font-size:.9em;
}
a:link{
color:#fff;
}
a:visited{
color:#ccc;
}
/*Base style for new messages in the main message area.*/
.msg{
background:#000;