- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎01-02-2014 03:58 PM
Hi all,
I really am perplexed by this issue - maybe it's an HTML nuance I'm not familiar with.
When using (and only when using) the email client (notifications do not do this) within a SNow case, every time that SNow interprets a new line (< p>) it creates a ridiculous amount of white space between the paragraphs. I just want our users to be able to push enter and it creates a line break when sending an email from within the case. The HTML format has "paragraph" set as the default and every new line entered creates 2-3 lines of white space in the final result.
We are trying to plug in templates for copy/paste within SNow email client but it interprets the HTML in wonky ways. I can deal with doing some text editing before hand but...
for example: creating a bullet list puts it in a paragraph block, creates a paragraph line between each bullet item AND inserts this special character above the list < p> & nbsp;< /p>. A three item bullet point list is now taking up HALF the page in the final email.
Why does it generate < p> & nbsp;< /p> between special format sections? How do I stop this??
Any help would be so appreciated. (Added spaces in html chars so it would be visible)
Thanks in advance!!!!!!!!!
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-18-2014 03:53 PM
Guys I opened a HI ticket and was provided a solution that I could tailor to work.
It's still a broken process but you can fix it by grabbing and deleting the extra carriage return tags with the following business rule. I haven't thoroughly tested it but in my first few trials it seems to work just fiiine. Was simpler than it seemed.
Business Rule: Fix Client Spacing
Table: sys_email
When: before
Update: true
Active:true
Script:
current.body = current.body.replace(/<br\/>/g,'');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-18-2014 03:53 PM
Guys I opened a HI ticket and was provided a solution that I could tailor to work.
It's still a broken process but you can fix it by grabbing and deleting the extra carriage return tags with the following business rule. I haven't thoroughly tested it but in my first few trials it seems to work just fiiine. Was simpler than it seemed.
Business Rule: Fix Client Spacing
Table: sys_email
When: before
Update: true
Active:true
Script:
current.body = current.body.replace(/<br\/>/g,'');
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎03-19-2014 03:40 PM
Thanks for sharing your answer!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-25-2014 01:39 AM
Another option is to keep your paragraphs closer to each other using CSS either by replacing all occurrences of <p> with <p style="margin: 0px; padding: 0px;"> using a business rule similar to one you mentioned or by inserting something like <style>p {margin: 0px; padding: 0px;}</style> into the HTML field as the default value.
Blog: https://sys.properties | Telegram: https://t.me/sys_properties | LinkedIn: https://www.linkedin.com/in/slava-savitsky/
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-04-2014 11:38 PM
Hi Bryan,
Thanks for sharing.
This worked for me but I also had to add the following condition:
current.type == 'send-ready'
and I had to modify the dictionary entry for sys_email.body to add the attribute "html_sanitize=false".

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-24-2014 04:17 PM
Posting for future search finds... I know it's not exactly the same as the original post, but it's similar enough.
I came across this issue (and post) as we've had issues with <br /> tags auto-translating into <p> </p> in the default 'text' field within Knowledge Articles (KB) upon save.
I found this seems to be a well-known issue with TinyMCE. Within HI, I was able to find 3 related articles:
PRB599780 / KB0538180
PRB584948 / KB0535106
PRB585174 / KB0524073
Excerpt from one Workaround:
Pressing return in a rich text editor like tinyMCE is supposed to create a paragraph break (in HTML, that's a <p>).
If you want to keep lines closer together (a single line-break, which is <br> in HTML), hold down the shift key when pressing return. This is standard across most word processors and email text editors.
I've found that directly editing the source HTML and wrapping my <br /> tags WITHIN the <p></p> tags solves this. It looks messy, but works...
<p>Text here <br /> & n b s p ;</p>
**you need the & n b s p ; otherwise the <br /> tag will be removed. Also, I had to space out the syntax to keep it from converting on the post here.