[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:
Sheldan
2021-03-28 17:12:08 +02:00
parent 26879b7952
commit 83ec7fc4cd
37 changed files with 76 additions and 76 deletions

View File

@@ -1,11 +1,11 @@
{ {
<#include "assignable_place_color">, <#include "assignable_place_color">,
"description": "${place.text?js_string}", "description": "${place.text?json_string}",
"fields": [ "fields": [
<#list roles as role> <#list roles as role>
{ {
"name": "${role.emote.emoteRepr?js_string}", "name": "${role.emote.emoteRepr?json_string}",
"value": "${role.description?js_string}", "value": "${role.description?json_string}",
"inline": "${place.inline?string('true', 'false')}" "inline": "${place.inline?string('true', 'false')}"
<#if role.forceNewMessage> <#if role.forceNewMessage>
,"forceNewMessage": "true" ,"forceNewMessage": "true"

View File

@@ -1 +1 @@
<#macro full_member_info member><@member_user_name member=member/> ${member.asMention?js_string} (${member.idLong?c})</#macro> <#macro full_member_info member><@member_user_name member=member/> ${member.asMention?json_string} (${member.idLong?c})</#macro>

View File

@@ -1 +1 @@
<#macro member_user_name member>${member.effectiveName?js_string}#${member.user.discriminator}</#macro> <#macro member_user_name member>${member.effectiveName?json_string}#${member.user.discriminator}</#macro>

View File

@@ -1 +1 @@
<#macro safe_include template_key><#assign rendered><#include "${template_key}"></#assign>${rendered?js_string}</#macro> <#macro safe_include template_key><#assign rendered><#include "${template_key}"></#assign>${rendered?json_string}</#macro>

View File

@@ -1 +1 @@
<#macro user_user_name user>${user.name?js_string}#${user.discriminator}</#macro> <#macro user_user_name user>${user.name?json_string}#${user.discriminator}</#macro>

View File

@@ -3,8 +3,8 @@
"title": "<@safe_include "help_command_embed_title"/>" "title": "<@safe_include "help_command_embed_title"/>"
}, },
<#include "abstracto_color">, <#include "abstracto_color">,
"description": "<@safe_include "help_command_embed_command_name"/>: **${command.name?js_string}** "description": "<@safe_include "help_command_embed_command_name"/>: **${command.name?json_string}**
<@safe_include "help_command_embed_command_description"/>: <#if command.templated> <@safe_include "${command.name}_description"/> <#else> ${command.description?js_string} </#if> <@safe_include "help_command_embed_command_description"/>: <#if command.templated> <@safe_include "${command.name}_description"/> <#else> ${command.description?json_string} </#if>
<#if command.help??> <#if command.help??>
<#if command.help.templated> <#if command.help.templated>
@@ -15,20 +15,20 @@
</#if> </#if>
<#else> <#else>
**<@safe_include "help_command_embed_command_usage"/>**: `${usage}` **<@safe_include "help_command_embed_command_usage"/>**: `${usage}`
**<@safe_include "help_command_embed_command_detailed_help"/>**: ${command.help.longHelp?js_string} **<@safe_include "help_command_embed_command_detailed_help"/>**: ${command.help.longHelp?json_string}
<#if command.help.hasExample> <#if command.help.hasExample>
<@safe_include "help_command_embed_command_example"/>:${command.help.example?js_string} <@safe_include "help_command_embed_command_example"/>:${command.help.example?json_string}
</#if> </#if>
</#if> </#if>
<#if command.aliases?? && command.aliases?size gt 0> <#if command.aliases?? && command.aliases?size gt 0>
<@safe_include "help_command_embed_command_aliases"/>: `${command.aliases?join("`, `")?js_string}` <@safe_include "help_command_embed_command_aliases"/>: `${command.aliases?join("`, `")?json_string}`
</#if> </#if>
<#if serverSpecificAliases?size gt 0> <#if serverSpecificAliases?size gt 0>
<@safe_include "help_command_embed_command_server_aliases"/>: `${serverSpecificAliases?join("`, `")?js_string}` <@safe_include "help_command_embed_command_server_aliases"/>: `${serverSpecificAliases?join("`, `")?json_string}`
</#if> </#if>
<#if restricted?? && restricted> <#if restricted?? && restricted>
<@safe_include "help_command_embed_command_executable_by"/>:<#if allowedRoles??> <#list allowedRoles as allowedRole> ${allowedRole.asMention?js_string}<#sep><@safe_include "help_command_embed_or"/><#else><@safe_include "help_command_embed_command_executable_by_nobody"/></#list> </#if> <@safe_include "help_command_embed_command_executable_by"/>:<#if allowedRoles??> <#list allowedRoles as allowedRole> ${allowedRole.asMention?json_string}<#sep><@safe_include "help_command_embed_or"/><#else><@safe_include "help_command_embed_command_executable_by_nobody"/></#list> </#if>
<#if immuneRoles?? ><@safe_include "help_command_embed_command_immune"/>: <#list immuneRoles as immuneRole> ${immuneRole.asMention?js_string}<#sep><@safe_include "help_command_embed_or"/><#else><@safe_include "help_command_embed_command_immune_none"/></#list> </#if> <#if immuneRoles?? ><@safe_include "help_command_embed_command_immune"/>: <#list immuneRoles as immuneRole> ${immuneRole.asMention?json_string}<#sep><@safe_include "help_command_embed_or"/><#else><@safe_include "help_command_embed_command_immune_none"/></#list> </#if>
<#else> <#else>
<@safe_include "help_command_embed_command_not_restricted"/> <@safe_include "help_command_embed_command_not_restricted"/>
</#if> </#if>
@@ -37,7 +37,7 @@
**<@safe_include "help_command_embed_command_parameters"/>**: **<@safe_include "help_command_embed_command_parameters"/>**:
<#if command.parameters??> <#if command.parameters??>
<#list command.parameters as parameter><#assign parameter=parameter> <#list command.parameters as parameter><#assign parameter=parameter>
<@safe_include "help_command_embed_command_description"/> `${parameter.name?js_string}`: <#if parameter.templated?? && parameter.templated><@safe_include "${command.name}_parameter_${parameter.name}"/><#else>${(parameter.description?js_string)!""}</#if> <@safe_include "help_command_embed_command_description"/> `${parameter.name?json_string}`: <#if parameter.templated?? && parameter.templated><@safe_include "${command.name}_parameter_${parameter.name}"/><#else>${(parameter.description?json_string)!""}</#if>
<#list parameter.validators as validator><#assign validator=validator><#assign model=validator.templateModel/><@safe_include "${validator.templateName}"/> <#list parameter.validators as validator><#assign validator=validator><#assign model=validator.templateModel/><@safe_include "${validator.templateName}"/>
</#list> </#list>

View File

@@ -5,12 +5,12 @@
}, },
<#include "abstracto_color">, <#include "abstracto_color">,
"description": " "description": "
<@safe_include "help_module_embed_module_name"/>: **${name?js_string}** <@safe_include "help_module_embed_module_name"/>: **${name?json_string}**
<@safe_include "help_module_embed_module_description"/>: <#if module.moduleDefinition.info.templated?? && module.moduleDefinition.info.templated><@safe_include "module_${name}_description"/><#else>${module.moduleDefinition.info.description?js_string}</#if> <@safe_include "help_module_embed_module_description"/>: <#if module.moduleDefinition.info.templated?? && module.moduleDefinition.info.templated><@safe_include "module_${name}_description"/><#else>${module.moduleDefinition.info.description?json_string}</#if>
<@safe_include "help_module_embed_commands"/>: <@safe_include "help_module_embed_commands"/>:
<#list module.commands as command>`${command.configuration.name?js_string}`<#sep>, <#else><@safe_include "help_module_no_commands_available"/></#list> <#list module.commands as command>`${command.configuration.name?json_string}`<#sep>, <#else><@safe_include "help_module_no_commands_available"/></#list>
<#if subModules?has_content && subModules?size gt 0> <#if subModules?has_content && subModules?size gt 0>
<@safe_include "help_module_embed_sub_modules"/>: <#list subModules as module>`${module.info.name?js_string}`<#sep>, </#list> <@safe_include "help_module_embed_sub_modules"/>: <#list subModules as module>`${module.info.name?json_string}`<#sep>, </#list>
</#if> </#if>
", ",
"footer": { "footer": {

View File

@@ -5,8 +5,8 @@
<#include "abstracto_color">, <#include "abstracto_color">,
"description": " "description": "
<#list modules as module><#assign module=module/> <#list modules as module><#assign module=module/>
**${module.info.name?js_string}** **${module.info.name?json_string}**
<#if module.info.templated?? && module.info.templated><@safe_include "module_${module.info.name}_description"/><#else>${module.info.description?js_string}</#if> <#if module.info.templated?? && module.info.templated><@safe_include "module_${module.info.name}_description"/><#else>${module.info.description?json_string}</#if>
</#list> </#list>
", ",
"footer": { "footer": {

View File

@@ -9,9 +9,9 @@
"fields": [ "fields": [
<#list groups as group> <#list groups as group>
{ {
"name": "${group.name?js_string} (<@safe_include "channel_group_type_${group.typeKey}_name"/>)", "name": "${group.name?json_string} (<@safe_include "channel_group_type_${group.typeKey}_name"/>)",
"value": " "value": "
<#list group.channels as channel><#if channel.discordChannel??>${channel.discordChannel.asMention?js_string}<#else>${channel.channel.id?c}</#if><#sep>,<#else> <@safe_include "listChannelGroups_no_channels"/></#list> <#list group.channels as channel><#if channel.discordChannel??>${channel.discordChannel.asMention?json_string}<#else>${channel.channel.id?c}</#if><#sep>,<#else> <@safe_include "listChannelGroups_no_channels"/></#list>
" "
}<#sep>, }<#sep>,
</#list> </#list>

View File

@@ -5,8 +5,8 @@
<#include "success_color">, <#include "success_color">,
"description": " "description": "
<#list postTargets as postTarget><#assign postTarget=postTarget/> <#list postTargets as postTarget><#assign postTarget=postTarget/>
<#assign postTargetName>${postTarget.postTarget.name?js_string}</#assign> <#assign postTargetName>${postTarget.postTarget.name?json_string}</#assign>
<#assign channelMention><#if postTarget.channel?has_content>${postTarget.channel.asMention?js_string}<#else><@safe_include "posttarget_no_channel"/></#if></#assign> <#assign channelMention><#if postTarget.channel?has_content>${postTarget.channel.asMention?json_string}<#else><@safe_include "posttarget_no_channel"/></#if></#assign>
<@safe_include "posttarget_post_target_text"/> <@safe_include "posttarget_post_target_text"/>
<#else> <#else>

View File

@@ -5,7 +5,7 @@
<#else> <#else>
"author": "author":
{ {
"name": "${fullUser.user.name?js_string}#${fullUser.user.discriminator}", "name": "${fullUser.user.name?json_string}#${fullUser.user.discriminator}",
"avatar": "${fullUser.user.effectiveAvatarUrl}" "avatar": "${fullUser.user.effectiveAvatarUrl}"
}, },
</#if> </#if>
@@ -17,8 +17,8 @@
"description": "<@safe_include "${template.templateName}"/>" "description": "<@safe_include "${template.templateName}"/>"
</#if> </#if>
<#elseif throwable.localizedMessage?has_content> <#elseif throwable.localizedMessage?has_content>
"description": "${throwable.localizedMessage?js_string}" "description": "${throwable.localizedMessage?json_string}"
<#else> <#else>
"description": "${throwable.class.simpleName?js_string}" "description": "${throwable.class.simpleName?json_string}"
</#if> </#if>
} }

View File

@@ -7,7 +7,7 @@
<#include "success_color">, <#include "success_color">,
"description": " "description": "
<#list roles as role> <#list roles as role>
${role.role.asMention?js_string} ${role.role.asMention?json_string}
<#else> <#else>
<@safe_include "list_disabled_experience_roles_embed_no_roles"/> <@safe_include "list_disabled_experience_roles_embed_no_roles"/>
</#list> </#list>

View File

@@ -3,11 +3,11 @@
<@user_author user=author/>, <@user_author user=author/>,
<#include "abstracto_color">, <#include "abstracto_color">,
<#if embeddedMessage.content?has_content || embeddedMessage.embeds?size gt 0> <#if embeddedMessage.content?has_content || embeddedMessage.embeds?size gt 0>
"description": "${embeddedMessage.content?js_string} "description": "${embeddedMessage.content?json_string}
<#list embeddedMessage.embeds> <#list embeddedMessage.embeds>
<@safe_include "message_embed_embed_embeds_name"/>: <@safe_include "message_embed_embed_embeds_name"/>:
<#items as embed><#assign embed=embed/> <#items as embed><#assign embed=embed/>
<@safe_include "message_embed_embed_description"/>: <#if embed.description?has_content >${embed.description?js_string}</#if> <#if embed.imageUrl?has_content> <@safe_include "message_embed_embed_image_url"/>: ${embed.imageUrl} </#if> <@safe_include "message_embed_embed_description"/>: <#if embed.description?has_content >${embed.description?json_string}</#if> <#if embed.imageUrl?has_content> <@safe_include "message_embed_embed_image_url"/>: ${embed.imageUrl} </#if>
</#items> </#items>
</#list> </#list>
", ",
@@ -18,8 +18,8 @@
"fields": [ "fields": [
{ {
"name": "<@safe_include "message_embed_embed_quoted_by_field_title"/>", "name": "<@safe_include "message_embed_embed_quoted_by_field_title"/>",
<#assign user>${embeddingUser.asMention?js_string}</#assign> <#assign user>${embeddingUser.asMention?json_string}</#assign>
<#assign channelName>${sourceChannel.name?js_string}</#assign> <#assign channelName>${sourceChannel.name?json_string}</#assign>
<#assign messageLink>${embeddedMessage.messageUrl}</#assign> <#assign messageLink>${embeddedMessage.messageUrl}</#assign>
"value": "<@safe_include "message_embed_embed_quoted_by_field_value"/>" "value": "<@safe_include "message_embed_embed_quoted_by_field_value"/>"
} }

View File

@@ -17,11 +17,11 @@
}, },
{ {
"name": "<@safe_include "ban_log_jump_link_field_title"/>", "name": "<@safe_include "ban_log_jump_link_field_title"/>",
"value": "[${messageChannel.name?js_string}](${message.jumpUrl})" "value": "[${messageChannel.name?json_string}](${message.jumpUrl})"
}, },
{ {
"name": "<@safe_include "ban_log_reason_field_title"/>", "name": "<@safe_include "ban_log_reason_field_title"/>",
"value": "${reason?js_string}" "value": "${reason?json_string}"
} }
] ]
} }

View File

@@ -15,11 +15,11 @@
}, },
{ {
"name": "<@safe_include "ban_log_jump_link_field_title"/>", "name": "<@safe_include "ban_log_jump_link_field_title"/>",
"value": "[${messageChannel.name?js_string}](${message.jumpUrl})" "value": "[${messageChannel.name?json_string}](${message.jumpUrl})"
}, },
{ {
"name": "<@safe_include "ban_log_reason_field_title"/>", "name": "<@safe_include "ban_log_reason_field_title"/>",
"value": "${reason?js_string}" "value": "${reason?json_string}"
} }
] ]
} }

View File

@@ -17,11 +17,11 @@
}, },
{ {
"name": "<@safe_include "kick_log_jump_link_field_title"/>", "name": "<@safe_include "kick_log_jump_link_field_title"/>",
"value": "[${channel.name?js_string}](${message.jumpUrl})" "value": "[${channel.name?json_string}](${message.jumpUrl})"
}, },
{ {
"name": "<@safe_include "kick_log_reason_field_title"/>", "name": "<@safe_include "kick_log_reason_field_title"/>",
"value": "${reason?js_string}" "value": "${reason?json_string}"
} }
] ]
} }

View File

@@ -18,8 +18,8 @@
}, },
<#include "success_color">, <#include "success_color">,
"description": "<#list userNotes as note><#assign note=note/> "description": "<#list userNotes as note><#assign note=note/>
<#assign user><#if note.fullUser.member?has_content>${note.fullUser.member.asMention?js_string}<#else>${note.fullUser.aUserInAServer.userReference.id?c}</#if></#assign> <#assign user><#if note.fullUser.member?has_content>${note.fullUser.member.asMention?json_string}<#else>${note.fullUser.aUserInAServer.userReference.id?c}</#if></#assign>
<#assign noteText>${note.note.note?js_string}</#assign> <#assign noteText>${note.note.note?json_string}</#assign>
<#assign noteId>${note.note.userNoteId.id}</#assign> <#assign noteId>${note.note.userNoteId.id}</#assign>
<#assign date>${formatDate(note.note.created, "yyyy-MM-dd HH:mm:ss")}</#assign> <#assign date>${formatDate(note.note.created, "yyyy-MM-dd HH:mm:ss")}</#assign>
<@safe_include "user_notes_note_entry"/><#else><@safe_include "user_notes_no_notes"/> <@safe_include "user_notes_note_entry"/><#else><@safe_include "user_notes_no_notes"/>

View File

@@ -17,11 +17,11 @@
}, },
{ {
"name": "<@safe_include "mute_log_mute_location_field_title"/>", "name": "<@safe_include "mute_log_mute_location_field_title"/>",
"value": "[${contextChannel.name?js_string}](${message.jumpUrl})" "value": "[${contextChannel.name?json_string}](${message.jumpUrl})"
}, },
{ {
"name": "<@safe_include "mute_log_mute_reason_field_title"/>", "name": "<@safe_include "mute_log_mute_reason_field_title"/>",
"value": "${reason?js_string}" "value": "${reason?json_string}"
}, },
{ {
"name": "<@safe_include "mute_log_mute_duration_field_title"/>", "name": "<@safe_include "mute_log_mute_duration_field_title"/>",

View File

@@ -40,7 +40,7 @@
}, },
{ {
"name": "<@safe_include "mute_log_mute_reason_field_title"/>", "name": "<@safe_include "mute_log_mute_reason_field_title"/>",
"value": "${mute.reason?js_string}" "value": "${mute.reason?json_string}"
} }
], ],
"footer": { "footer": {

View File

@@ -19,11 +19,11 @@
</#if> </#if>
{ {
"name": "<@safe_include "warn_log_warn_location_field_title"/>", "name": "<@safe_include "warn_log_warn_location_field_title"/>",
"value": "[${channel.name?js_string}](${message.jumpUrl})" "value": "[${channel.name?json_string}](${message.jumpUrl})"
}, },
{ {
"name": "<@safe_include "warn_log_warn_reason_field_title"/>", "name": "<@safe_include "warn_log_warn_reason_field_title"/>",
"value": "${reason?js_string}" "value": "${reason?json_string}"
} }
], ],
"footer": { "footer": {

View File

@@ -11,7 +11,7 @@
}, },
{ {
"name": "<@safe_include "invite_link_deleted_message_link_title"/>", "name": "<@safe_include "invite_link_deleted_message_link_title"/>",
"value": "[${channel.name?js_string}](${message.jumpUrl})" "value": "[${channel.name?json_string}](${message.jumpUrl})"
} }
] ]
} }

View File

@@ -6,11 +6,11 @@
"fields": [ "fields": [
{ {
"name": "<@safe_include "messageDeleted_original_message_field_title"/>", "name": "<@safe_include "messageDeleted_original_message_field_title"/>",
"value": "${cachedMessage.content?js_string}" "value": "${cachedMessage.content?json_string}"
}, },
{ {
"name": "<@safe_include "messageDeleted_message_link_field_title"/>", "name": "<@safe_include "messageDeleted_message_link_field_title"/>",
"value": "[${channel.name?js_string}](${cachedMessage.messageUrl})" "value": "[${channel.name?json_string}](${cachedMessage.messageUrl})"
} }
] ]
} }

View File

@@ -6,15 +6,15 @@
"fields": [ "fields": [
{ {
"name": "<@safe_include "messageEdited_original_message_field_title"/>", "name": "<@safe_include "messageEdited_original_message_field_title"/>",
"value": "${messageBefore.content?js_string}" "value": "${messageBefore.content?json_string}"
}, },
{ {
"name": "<@safe_include "messageEdited_new_message_field_title"/>", "name": "<@safe_include "messageEdited_new_message_field_title"/>",
"value": "${messageAfter.contentRaw?js_string}" "value": "${messageAfter.contentRaw?json_string}"
}, },
{ {
"name": "<@safe_include "messageEdited_link_field_title"/>", "name": "<@safe_include "messageEdited_link_field_title"/>",
"value": "[${messageChannel.name?js_string}](${messageBefore.messageUrl})" "value": "[${messageChannel.name?json_string}](${messageBefore.messageUrl})"
} }
] ]
} }

View File

@@ -4,7 +4,7 @@
}, },
<#include "moderation_action_color">, <#include "moderation_action_color">,
"description": "<#list warnings as warning><#assign warning=warning/> "description": "<#list warnings as warning><#assign warning=warning/>
<#if warning.warnedMember??><#assign warnedUser>${warning.warnedMember.asMention?js_string} (${warning.warnedMember.id?c})</#assign><#else><#assign warnedUser> ${warning.warnedUser.userId?c}</#assign></#if> <#if warning.warningMember??><#assign warningUser> ${warning.warningMember.asMention?js_string} (${warning.warningMember.id})</#assign><#else><#assign warningUser>${warning.warningUser.warningUser.userId?c}</#assign></#if> <#assign warnDate>${formatDate(warning.warning.warnDate, "yyyy-MM-dd HH:mm:ss")}</#assign><#assign warnReason=warning.warning.reason/> <@safe_include "warnDecay_log_warn_entry"/> <#if warning.warnedMember??><#assign warnedUser>${warning.warnedMember.asMention?json_string} (${warning.warnedMember.id?c})</#assign><#else><#assign warnedUser> ${warning.warnedUser.userId?c}</#assign></#if> <#if warning.warningMember??><#assign warningUser> ${warning.warningMember.asMention?json_string} (${warning.warningMember.id})</#assign><#else><#assign warningUser>${warning.warningUser.warningUser.userId?c}</#assign></#if> <#assign warnDate>${formatDate(warning.warning.warnDate, "yyyy-MM-dd HH:mm:ss")}</#assign><#assign warnReason=warning.warning.reason/> <@safe_include "warnDecay_log_warn_entry"/>
<#else> <#else>
<@safe_include "warnDecay_log_no_warnings"/> <@safe_include "warnDecay_log_no_warnings"/>
</#list>" </#list>"

View File

@@ -14,6 +14,6 @@
} }
] ]
<#if roles?size gt 0> <#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> </#if>
} }

View File

@@ -6,7 +6,7 @@
}, },
<#include "modmail_color">, <#include "modmail_color">,
<#if postedMessage.contentRaw?has_content> <#if postedMessage.contentRaw?has_content>
"description": "${postedMessage.contentRaw?js_string}" "description": "${postedMessage.contentRaw?json_string}"
</#if> </#if>
<#if postedMessage.attachments?size gt 0> <#if postedMessage.attachments?size gt 0>
<#if postedMessage.contentRaw?has_content>,</#if> <#if postedMessage.contentRaw?has_content>,</#if>
@@ -14,6 +14,6 @@
</#if> </#if>
<#if subscribers?size gt 0> <#if subscribers?size gt 0>
<#if postedMessage.contentRaw?has_content || postedMessage.attachments?size gt 0>,</#if> <#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> </#if>
} }

View File

@@ -3,7 +3,7 @@
<@member_author member=author/>, <@member_author member=author/>,
<#include "modmail_color"> <#include "modmail_color">
<#if message.embeds[0].description?has_content> <#if message.embeds[0].description?has_content>
,"description": "${message.embeds[0].description?js_string}" ,"description": "${message.embeds[0].description?json_string}"
</#if> </#if>
<#if message.embeds[0].image?has_content> <#if message.embeds[0].image?has_content>
,"imageUrl": "${message.embeds[0].image.proxyUrl}" ,"imageUrl": "${message.embeds[0].image.proxyUrl}"

View File

@@ -1,4 +1,4 @@
{ {
<#include "modmail_color">, <#include "modmail_color">,
"description": "${closingMessage?js_string}" "description": "${closingMessage?json_string}"
} }

View File

@@ -6,7 +6,7 @@
}, },
<#include "modmail_color"> <#include "modmail_color">
<#if text?has_content> <#if text?has_content>
, "description": "${text?js_string}" , "description": "${text?json_string}"
</#if> </#if>
<#if postedMessage.attachments?size gt 0> <#if postedMessage.attachments?size gt 0>
,"imageUrl": "${postedMessage.attachments[0].proxyUrl}" ,"imageUrl": "${postedMessage.attachments[0].proxyUrl}"

View File

@@ -4,6 +4,6 @@
<#include "modmail_color">, <#include "modmail_color">,
<#assign user><@member_user_name member=member/> (${member.user.id})</#assign> <#assign user><@member_user_name member=member/> (${member.user.id})</#assign>
<#assign joinDate>${member.timeJoined}</#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"/>" "description": "<@safe_include "modmail_thread_header_embed_description"/>"
} }

View File

@@ -10,12 +10,12 @@
}, },
{ {
"name": "<@safe_include "remind_reminder_note_field_title"/>", "name": "<@safe_include "remind_reminder_note_field_title"/>",
"value": "${reminder.text?js_string}" "value": "${reminder.text?json_string}"
}, },
{ {
"name": "<@safe_include "remind_reminder_link_field_title"/>", "name": "<@safe_include "remind_reminder_link_field_title"/>",
"value": "[<@safe_include "remind_reminder_link_content_display_text"/>](${messageUrl})" "value": "[<@safe_include "remind_reminder_link_content_display_text"/>](${messageUrl})"
} }
], ],
"additionalMessage": "${member.asMention?js_string}" "additionalMessage": "${member.asMention?json_string}"
} }

View File

@@ -5,5 +5,5 @@
<@member_author member=member/>, <@member_author member=member/>,
<#include "abstracto_color">, <#include "abstracto_color">,
"description": "<@safe_include "remind_reminding_description_text"/>", "description": "<@safe_include "remind_reminding_description_text"/>",
"additionalMessage": "${member.asMention?js_string}" "additionalMessage": "${member.asMention?json_string}"
} }

View File

@@ -20,7 +20,7 @@
<#list starGiver as starrer><#assign starrer=starrer/> <#list starGiver as starrer><#assign starrer=starrer/>
<#assign badge>${badgeEmotes[starrer?index]}</#assign><#assign count>${starrer.starCount}</#assign> <#assign badge>${badgeEmotes[starrer?index]}</#assign><#assign count>${starrer.starCount}</#assign>
<#if starrer.member?has_content> <#if starrer.member?has_content>
<#assign user>${starrer.member.asMention?js_string}</#assign> <@safe_include "starStats_starrer_entry"/> <#assign user>${starrer.member.asMention?json_string}</#assign> <@safe_include "starStats_starrer_entry"/>
<#else> <#else>
<#assign user>${starrer.user.userReference.id?c}</#assign> <@safe_include "starStats_starrer_entry_left_guild"/> <#assign user>${starrer.user.userReference.id?c}</#assign> <@safe_include "starStats_starrer_entry_left_guild"/>
</#if> </#if>
@@ -35,7 +35,7 @@
<#list starReceiver as starred><#assign starred=starred/> <#list starReceiver as starred><#assign starred=starred/>
<#assign badge>${badgeEmotes[starred?index]}</#assign><#assign count>${starred.starCount}</#assign> <#assign badge>${badgeEmotes[starred?index]}</#assign><#assign count>${starred.starCount}</#assign>
<#if starred.member?has_content> <#if starred.member?has_content>
<#assign user>${starred.member.asMention?js_string}</#assign> <@safe_include "starStats_receiver_entry"/> <#assign user>${starred.member.asMention?json_string}</#assign> <@safe_include "starStats_receiver_entry"/>
<#else> <#else>
<#assign user>${starred.user.userReference.id?c}</#assign> <@safe_include "starStats_receiver_entry_left_guild"/> <#assign user>${starred.user.userReference.id?c}</#assign> <@safe_include "starStats_receiver_entry_left_guild"/>
</#if> </#if>

View File

@@ -3,11 +3,11 @@
<@user_author user=author/>, <@user_author user=author/>,
<#include "abstracto_color">, <#include "abstracto_color">,
<#if message.content?has_content || message.embeds?size gt 0> <#if message.content?has_content || message.embeds?size gt 0>
"description": "${message.content?js_string} "description": "${message.content?json_string}
<#list message.embeds> <#list message.embeds>
<@safe_include "starboard_post_embed_embeds_name"/>: <@safe_include "starboard_post_embed_embeds_name"/>:
<#items as embed> <#items as embed>
<@safe_include "starboard_post_embed_description"/>: ${embed.description?js_string} <#if embed.imageUrl?has_content> <@safe_include "starboard_post_embed_image_url"/>: ${embed.imageUrl} </#if> <@safe_include "starboard_post_embed_description"/>: ${embed.description?json_string} <#if embed.imageUrl?has_content> <@safe_include "starboard_post_embed_image_url"/>: ${embed.imageUrl} </#if>
</#items> </#items>
</#list> </#list>
", ",
@@ -16,7 +16,7 @@
<#assign count>${starCount}</#assign> <#assign count>${starCount}</#assign>
<#assign messageId>${message.messageId?c}</#assign> <#assign messageId>${message.messageId?c}</#assign>
<#if channel?has_content> <#if channel?has_content>
<#assign channelMention>${channel.asMention?js_string}</#assign> <#assign channelMention>${channel.asMention?json_string}</#assign>
"additionalMessage": "<@safe_include "starboard_post_embed_additional_message"/>" "additionalMessage": "<@safe_include "starboard_post_embed_additional_message"/>"
<#else> <#else>
<#assign channelMention>${sourceChannelId?c}</#assign> <#assign channelMention>${sourceChannelId?c}</#assign>
@@ -29,7 +29,7 @@
{ {
"name": "<@safe_include "starboard_post_embed_original_field_title"/>" "name": "<@safe_include "starboard_post_embed_original_field_title"/>"
<#if channel?has_content> <#if channel?has_content>
,"value": "[${channel.name?js_string}](${message.messageUrl})" ,"value": "[${channel.name?json_string}](${message.messageUrl})"
<#else> <#else>
,"value": "[${sourceChannelId?c}](${message.messageUrl})" ,"value": "[${sourceChannelId?c}](${message.messageUrl})"
</#if> </#if>

View File

@@ -20,9 +20,9 @@
<#include "abstracto_color">, <#include "abstracto_color">,
<#assign id>${suggestionId}</#assign> <#assign id>${suggestionId}</#assign>
<#if state = "ACCEPTED" || state = "REJECTED"> <#if state = "ACCEPTED" || state = "REJECTED">
"description": "~~${text?js_string}~~", "description": "~~${text?json_string}~~",
<#else> <#else>
"description": "${text?js_string}", "description": "${text?json_string}",
</#if> </#if>
<#if state = "ACCEPTED" || state = "REJECTED"> <#if state = "ACCEPTED" || state = "REJECTED">
"fields": [ "fields": [
@@ -34,7 +34,7 @@
, ,
{ {
"name": "<@safe_include "suggest_reason_field_title"/>", "name": "<@safe_include "suggest_reason_field_title"/>",
"value": "${reason?js_string}" "value": "${reason?json_string}"
} }
</#if> </#if>
], ],

View File

@@ -6,7 +6,7 @@
"fields": [ "fields": [
{ {
"name": "<@safe_include "showAvatar_response_embed_user_field_title"/>", "name": "<@safe_include "showAvatar_response_embed_user_field_title"/>",
"value": "${memberInfo.user.name?js_string}#${memberInfo.user.discriminator}", "value": "${memberInfo.user.name?json_string}#${memberInfo.user.discriminator}",
"inline": "true" "inline": "true"
}, },
{ {

View File

@@ -12,7 +12,7 @@
<#if memberInfo.nickname?has_content> <#if memberInfo.nickname?has_content>
{ {
"name": "<@safe_include "userInfo_response_embed_nickname_field_title"/>", "name": "<@safe_include "userInfo_response_embed_nickname_field_title"/>",
"value": "${memberInfo.nickname?js_string}", "value": "${memberInfo.nickname?json_string}",
"inline": "true" "inline": "true"
}, },
</#if> </#if>
@@ -35,7 +35,7 @@
, ,
{ {
"name": "<@safe_include "userInfo_response_embed_activity_field_title"/>", "name": "<@safe_include "userInfo_response_embed_activity_field_title"/>",
"value": "<#list memberInfo.activities as activity>${activity.type?js_string}<#sep>, </#list>", "value": "<#list memberInfo.activities as activity>${activity.type?json_string}<#sep>, </#list>",
"inline": "true" "inline": "true"
} }
</#if> </#if>