fixed escaping bug in commands.cpp cogs
This commit is contained in:
parent
bfffa2dd7f
commit
f140b9b68c
@ -29,8 +29,8 @@ DLL_PUBLIC map<string, CommandFunction> cellar::commands::bottles_commands() {
|
|||||||
desc = " ".join(linesplit[2:]) # Rest of line assumed to be description
|
desc = " ".join(linesplit[2:]) # Rest of line assumed to be description
|
||||||
cog.outl("cellar::help::set_description(\"{0}\", \"{1}\");"
|
cog.outl("cellar::help::set_description(\"{0}\", \"{1}\");"
|
||||||
.format(name, desc
|
.format(name, desc
|
||||||
.replace("\"", "\\\"")
|
.replace("\\", "\\\\")
|
||||||
.replace("\\", "\\\\")))
|
.replace("\"", "\\\"")))
|
||||||
# the replace methods escape " and \ characters
|
# the replace methods escape " and \ characters
|
||||||
else:
|
else:
|
||||||
print("-- No description is available for the {0} command.".format(name))
|
print("-- No description is available for the {0} command.".format(name))
|
||||||
|
@ -39,8 +39,8 @@ map<string, CommandFunction> cellar::commands::core_commands() {
|
|||||||
desc = " ".join(linesplit[2:]) # Rest of line assumed to be description
|
desc = " ".join(linesplit[2:]) # Rest of line assumed to be description
|
||||||
cog.outl("cellar::help::set_description(\"{0}\", \"{1}\");"
|
cog.outl("cellar::help::set_description(\"{0}\", \"{1}\");"
|
||||||
.format(name, desc
|
.format(name, desc
|
||||||
.replace("\"", "\\\"")
|
.replace("\\", "\\\\")
|
||||||
.replace("\\", "\\\\")))
|
.replace("\"", "\\\"")))
|
||||||
# the replace methods escape " and \ characters
|
# the replace methods escape " and \ characters
|
||||||
else:
|
else:
|
||||||
print("-- No description is available for the {0} command.".format(name))
|
print("-- No description is available for the {0} command.".format(name))
|
||||||
|
@ -29,8 +29,8 @@ DLL_PUBLIC map<string, CommandFunction> cellar::commands::launch_commands() {
|
|||||||
desc = " ".join(linesplit[2:]) # Rest of line assumed to be description
|
desc = " ".join(linesplit[2:]) # Rest of line assumed to be description
|
||||||
cog.outl("cellar::help::set_description(\"{0}\", \"{1}\");"
|
cog.outl("cellar::help::set_description(\"{0}\", \"{1}\");"
|
||||||
.format(name, desc
|
.format(name, desc
|
||||||
.replace("\"", "\\\"")
|
.replace("\\", "\\\\")
|
||||||
.replace("\\", "\\\\")))
|
.replace("\"", "\\\"")))
|
||||||
# the replace methods escape " and \ characters
|
# the replace methods escape " and \ characters
|
||||||
else:
|
else:
|
||||||
print("-- No description is available for the {0} command.".format(name))
|
print("-- No description is available for the {0} command.".format(name))
|
||||||
|
Loading…
Reference in New Issue
Block a user