diff --git a/evennia/prototypes/prototypes.py b/evennia/prototypes/prototypes.py
index 35122f68fc..e2c39d5700 100644
--- a/evennia/prototypes/prototypes.py
+++ b/evennia/prototypes/prototypes.py
@@ -929,7 +929,10 @@ def init_spawn_value(value, validator=None):
value = validator(value[0](*make_iter(args)))
else:
value = validator(value)
- return protfunc_parser(value)
+ result = protfunc_parser(value)
+ if result != value:
+ return validator(result)
+ return result
def value_to_obj_or_any(value):
diff --git a/evennia/utils/tests/test_text2html.py b/evennia/utils/tests/test_text2html.py
index 9e331f630d..0bb151f22b 100644
--- a/evennia/utils/tests/test_text2html.py
+++ b/evennia/utils/tests/test_text2html.py
@@ -156,7 +156,7 @@ class TestText2Html(TestCase):
"tab": "\t",
"space": "",
}
- self.assertEqual(" ", parser.sub_text(mocked_match))
+ self.assertEqual(" ", parser.sub_text(mocked_match))
mocked_match.groupdict.return_value = {
"htmlchars": "",
@@ -165,7 +165,7 @@ class TestText2Html(TestCase):
"space": " ",
"spacestart": " ",
}
- self.assertEqual(" ",
+ self.assertEqual(" ",
parser.sub_text(mocked_match))
mocked_match.groupdict.return_value = {
@@ -182,16 +182,16 @@ class TestText2Html(TestCase):
parser = text2html.HTML_PARSER
parser.tabstop = 4
# single tab
- self.assertEqual(parser.parse("foo|-foo"),
- "foo foo")
+ self.assertEqual(parser.parse("foo|>foo"),
+ "foo foo")
# space and tab
- self.assertEqual(parser.parse("foo |-foo"),
+ self.assertEqual(parser.parse("foo |>foo"),
"foo foo")
# space, tab, space
- self.assertEqual(parser.parse("foo |- foo"),
- "foo foo")
+ self.assertEqual(parser.parse("foo |> foo"),
+ "foo foo")
def test_parse_space_to_html(self):
"""test space parsing - a single space should be kept, two or more
diff --git a/evennia/utils/text2html.py b/evennia/utils/text2html.py
index 34fd11c9f1..7fb19a8ab8 100644
--- a/evennia/utils/text2html.py
+++ b/evennia/utils/text2html.py
@@ -308,7 +308,7 @@ class TextToHTMLparser(object):
elif cdict["lineend"]:
return "
"
elif cdict["tab"]:
- text = cdict["tab"].replace("\t", " ")
+ text = cdict["tab"].replace("\t", " " + " " * (self.tabstop - 1))
return text
elif cdict["space"] or cdict["spacestart"]:
text = cdict["space"]