mirror of
https://github.com/Sheldan/abstracto-templates.git
synced 2026-04-05 17:07:05 +00:00
[AB-216] replacing js_string with json_string in order to escape characters, because js_string could lead to illegal escape sequences
This commit is contained in:
@@ -14,6 +14,6 @@
|
||||
}
|
||||
]
|
||||
<#if roles?size gt 0>
|
||||
,"additionalMessage": "<#list roles as role>${role.role.asMention?js_string}<#sep>,</#list>"
|
||||
,"additionalMessage": "<#list roles as role>${role.role.asMention?json_string}<#sep>,</#list>"
|
||||
</#if>
|
||||
}
|
||||
@@ -6,7 +6,7 @@
|
||||
},
|
||||
<#include "modmail_color">,
|
||||
<#if postedMessage.contentRaw?has_content>
|
||||
"description": "${postedMessage.contentRaw?js_string}"
|
||||
"description": "${postedMessage.contentRaw?json_string}"
|
||||
</#if>
|
||||
<#if postedMessage.attachments?size gt 0>
|
||||
<#if postedMessage.contentRaw?has_content>,</#if>
|
||||
@@ -14,6 +14,6 @@
|
||||
</#if>
|
||||
<#if subscribers?size gt 0>
|
||||
<#if postedMessage.contentRaw?has_content || postedMessage.attachments?size gt 0>,</#if>
|
||||
"additionalMessage": "<#list subscribers as subscriber>${subscriber.member.asMention?js_string}<#sep>,</#list>"
|
||||
"additionalMessage": "<#list subscribers as subscriber>${subscriber.member.asMention?json_string}<#sep>,</#list>"
|
||||
</#if>
|
||||
}
|
||||
@@ -3,7 +3,7 @@
|
||||
<@member_author member=author/>,
|
||||
<#include "modmail_color">
|
||||
<#if message.embeds[0].description?has_content>
|
||||
,"description": "${message.embeds[0].description?js_string}"
|
||||
,"description": "${message.embeds[0].description?json_string}"
|
||||
</#if>
|
||||
<#if message.embeds[0].image?has_content>
|
||||
,"imageUrl": "${message.embeds[0].image.proxyUrl}"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{
|
||||
<#include "modmail_color">,
|
||||
"description": "${closingMessage?js_string}"
|
||||
"description": "${closingMessage?json_string}"
|
||||
}
|
||||
@@ -6,7 +6,7 @@
|
||||
},
|
||||
<#include "modmail_color">
|
||||
<#if text?has_content>
|
||||
, "description": "${text?js_string}"
|
||||
, "description": "${text?json_string}"
|
||||
</#if>
|
||||
<#if postedMessage.attachments?size gt 0>
|
||||
,"imageUrl": "${postedMessage.attachments[0].proxyUrl}"
|
||||
|
||||
@@ -4,6 +4,6 @@
|
||||
<#include "modmail_color">,
|
||||
<#assign user><@member_user_name member=member/> (${member.user.id})</#assign>
|
||||
<#assign joinDate>${member.timeJoined}</#assign>
|
||||
<#assign roles><#list member.roles as role>${role.asMention?js_string}<#sep>,<#else><@safe_include "modmail_thread_header_no_roles"/></#list></#assign>
|
||||
<#assign roles><#list member.roles as role>${role.asMention?json_string}<#sep>,<#else><@safe_include "modmail_thread_header_no_roles"/></#list></#assign>
|
||||
"description": "<@safe_include "modmail_thread_header_embed_description"/>"
|
||||
}
|
||||
Reference in New Issue
Block a user