File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed
Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -270,14 +270,15 @@ export class XssSafeFactory {
270270 } ;
271271
272272 public btnSecureMenuBtn = ( replyOption : ReplyOption ) => {
273- const actionText = replyOption . replace ( 'a_' , '' ) . replace ( '_' , ' ' ) ;
274- const action = {
275- underscore : actionText . replace ( ' ' , '_' ) ,
276- hyphen : actionText . replace ( ' ' , '-' ) ,
273+ const replyOptionText = replyOption . replace ( 'a_' , '' ) . replace ( '_' , ' ' ) ;
274+ const htmlAttrib = {
275+ className : replyOptionText . replace ( ' ' , '_' ) ,
276+ testName : replyOptionText . replace ( ' ' , '-' ) ,
277277 } ;
278+ const displayText = replyOptionText === 'reply all' ? replyOptionText . replace ( 'all' , 'to all' ) : replyOptionText ;
278279 // * The action_${action.underscore}_message_button is used as an identifier in GmailElementReplacer.actionActivateSecureReplyHandler()
279- return `<div class="action_${ action . underscore } _message_button action_menu_message_button" data-test="action-${ action . hyphen } -message-button">
280- <img src="${ this . srcImg ( `svgs/${ action . hyphen } -icon.svg` ) } " /><span>secure ${ actionText } </span>
280+ return `<div class="action_${ htmlAttrib . className } _message_button action_menu_message_button" data-test="action-${ htmlAttrib . testName } -message-button">
281+ <img src="${ this . srcImg ( `svgs/${ htmlAttrib . testName } -icon.svg` ) } " /><span>secure ${ displayText } </span>
281282 </div>` ;
282283 } ;
283284
You can’t perform that action at this time.
0 commit comments