When someone post a code in issue (for example technical part) and she/he use Mac the code may contain Line Separator unicode character (U+2028 : LINE SEPARATOR) that seems not correct!
How can I get ride of those? is there any fix for that?
Hi Sedeq - Welcome to the Atlassian Community!
Maybe try this:
Use {{issue.summary.replaceAll("\n", "")}} to remove all newline characters ("\n") instead of {{issue.summary}}.
It is not \n (New Line character) it is Line Separator character ( U+2028 or 0x2028 ) In addition I'm just a user.
is there any solution for that?
ps. More information about this character available here: https://unicodemap.org/details/0x2028/index.html
If the \n doesn't work, I am sorry but it's out of my league to solve.
If i was the administrator I can use your suggested way to get ride of that but small change ( `\n` -> `\0x2028` ) but I just have user access :-/
I used this user.js script run by TamperMonkey extension for now:
// ==UserScript==// @name remove Line Separator character for Jira// @namespace http://scripts.sadeq.uk/get-ride-of-line-separator.user.js// @version 0.2// @description this will remove inusefull Line Separator character from notes in Jira// @author Sadeq// @match https://*.atlassian.net/*// @icon https://www.google.com/s2/favicons?sz=64&domain=sadeq.uk// @grant none// ==/UserScript==(function () {'use strict';var FixLSTimer;const replaceOnDocument = (pattern, string, {target = document.body} = {}) => { clearTimeout(FixLSTimer); [ target, ...target.querySelectorAll("*:not(script):not(noscript):not(style)"), ].forEach(({childNodes: [...nodes]}) => nodes .filter(({nodeType}) => nodeType === document.TEXT_NODE) .forEach((textNode) => {if (!textNode.isContentEditable) { textNode.textContent = textNode.textContent.replace(pattern, string) } } )); clearTimeout(FixLSTimer); }; document.addEventListener('load', function(e) { FixLSTimer = setTimeout( () => replaceOnDocument('\u2028', ''), 100); }, true);})();
It looks like you're new here. Sign in or register to get started.