Using the attribute_view_gui function you also iclude the formated output of the attribute level template in your string. Since you need the raw output of a Text block datatype you could try something like this:
{$var.data_map.description.content|extract(0,10)}
However, if you are using an XML block datatype you also need output.output_text and strip the tags from your text with the PHP strip_tags operator.