‘<>’ are just cut in Email notification

General question about the package, problems, solutions
apugazhenthy
Posts: 15
Joined: Mon Jun 27, 2016 8:16 am

‘<>’ are just cut in Email notification

Postby apugazhenthy » Mon Dec 19, 2016 1:27 am

Dear Pavel,

Would require your expertise to address the below issue.

When we add any comments in between "<>" this symbols in Clear Quest get nullified in Email notification.

in the below screenshots I have added "<LIST.txt>" in the comment statement.

CQ1.jpg
CQ1.jpg (41.51 KiB) Viewed 945 times


Then "<LIST.txt>" text was missing in the Email notification mail.

CQ2.jpg
CQ2.jpg (28.97 KiB) Viewed 945 times

Pavel
Posts: 281
Joined: Fri Dec 12, 2008 12:19 am

Re: ‘<>’ are just cut in Email notification

Postby Pavel » Mon Dec 19, 2016 10:37 am

Hi,

Please check generated message in the correspondent email queue, en_email_message, record.
If this message contains <LIST.txt> there, it would mean that email message is created successfully, and the problem is caused by either SMTP gateway or email client.

Pavel

apugazhenthy
Posts: 15
Joined: Mon Jun 27, 2016 8:16 am

Re: ‘<>’ are just cut in Email notification

Postby apugazhenthy » Tue Dec 20, 2016 12:36 am

Dear Pavel,

I can see the missed text in email queue message body but all the text in the body content are in HTML formatted text.

CQ3.JPG
CQ3.JPG (34.51 KiB) Viewed 939 times


As per my understanding during the HTML parsing only "<LIST.txt>" get cut in the email body.

Could you please provide your view and solution for this issue.


Many Thanks,
Pugazhenthy A

Pavel
Posts: 281
Joined: Fri Dec 12, 2008 12:19 am

Re: ‘<>’ are just cut in Email notification

Postby Pavel » Tue Dec 20, 2016 8:50 pm

apugazhenthy wrote:As per my understanding during the HTML parsing only "<LIST.txt>" get cut in the email body.
Could you please provide your view and solution for this issue.

Since you are using HTML, you need to replace special characters with escape sequence.
For instance, "<" should be replaced in HTML message with "&lt;" and ">" with "&gt;"
It can be easily achieved using user-defined function.

Code: Select all

use CGI qw(:standard escapeHTML);
return escapeHTML(shift);


Pavel

apugazhenthy
Posts: 15
Joined: Mon Jun 27, 2016 8:16 am

Re: ‘<>’ are just cut in Email notification

Postby apugazhenthy » Wed Dec 21, 2016 5:08 am

Pavel wrote:It can be easily achieved using user-defined function.

Code: Select all

use CGI qw(:standard escapeHTML);
return escapeHTML(shift);



Dear Pavel,

Thanks for your valuable time and consideration.

created new udb_property with the code you provided and named it as Escapechar.

Esc.JPG
Esc.JPG (31.39 KiB) Viewed 926 times


Now I am wondering where to call this function, whether at Email rule body or somewhere else like message header.

Could you please clarify on my query?


Regards,
Pugazhenthy A

Pavel
Posts: 281
Joined: Fri Dec 12, 2008 12:19 am

Re: ‘<>’ are just cut in Email notification

Postby Pavel » Wed Dec 21, 2016 6:35 am

apugazhenthy wrote:
Pavel wrote:It can be easily achieved using user-defined function.

Code: Select all

use CGI qw(:standard escapeHTML);
return escapeHTML(shift);



Dear Pavel,

Thanks for your valuable time and consideration.

created new udb_property with the code you provided and named it as Escapechar.

Esc.JPG

Now I am wondering where to call this function, whether at Email rule body or somewhere else like message header.

Could you please clarify on my query?


Regards,
Pugazhenthy A


You suppose to call it in the email notification rule message body, to escape fields that might contain special characters. For instance, if you use field "Description",

Code: Select all

...
Escapechar($Description)
...

Pavel

apugazhenthy
Posts: 15
Joined: Mon Jun 27, 2016 8:16 am

Re: ‘<>’ are just cut in Email notification

Postby apugazhenthy » Wed Dec 21, 2016 11:04 am

Thanks a lot Pavel..
It's working fine now... :D


Return to “Email Notification Package Q&A”

Who is online

Users browsing this forum: No registered users and 2 guests

cron