def text_to_pango(self):
def replace(s):<EOL><INDENT>s = s.split("<STR_LIT:&>")<EOL>out = s[<NUM_LIT:0>]<EOL>for i in range(len(s) - <NUM_LIT:1>):<EOL><INDENT>if s[i + <NUM_LIT:1>].startswith("<STR_LIT>"):<EOL><INDENT>out += "<STR_LIT:&>" + s[i + <NUM_LIT:1>]<EOL><DEDENT>else:<EOL><INDENT>out += "<STR_LIT>" + s[i + <NUM_LIT:1>]<EOL><DEDENT><DEDENT>return out<EOL><DEDENT>if "<STR_LIT>" in self.output.keys():<EOL><INDENT>self.output["<STR_LIT>"] = replace(self.output["<STR_LIT>"])<EOL><DEDENT>if "<STR_LIT>" in self.output.keys():<EOL><INDENT>self.output["<STR_LIT>"] = replace(self.output["<STR_LIT>"])<EOL><DEDENT>
Replaces all ampersands in `full_text` and `short_text` attributes of
`self.output` with `&amp;`.

It is called internally when pango markup is used.

Can be called multiple times (`&amp;` won't change to `&amp;amp;`).