View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0021410 | mantisbt | ui | public | 2016-07-22 09:07 | 2016-08-28 01:12 |
Reporter | geoff@streeter.gr | Assigned To | dregad | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
OS | Linux | OS Version | Kubuntu 14.04 | ||
Product Version | 1.2.3 | ||||
Target Version | 1.3.1 | Fixed in Version | 1.3.1 | ||
Summary | 0021410: text looks OK in edit of note but renders badly | ||||
Description | text looks OK in edit of note but renders badly | ||||
Steps To Reproduce | Wrap <\pre> tags around the text in the file and use it as a note | ||||
Tags | No tags attached. | ||||
Attached Files | |||||
related to | 0021594 | new | Improve display of 'pre' tags |
|
|
The incomplete boxes and extra lines are not supposed to be there. |
|
The issue occurs at string_nl2br() function Disabling wrapping pre text shows the correct line breaks: $g_wrap_in_preformatted_text = OFF; |
|
this may fix it: note adding "u" as modifier for the regexp.
seems like the 100 character count for line wrap is counted in bytes, for extended chars, unless the option is set? |
|
Correct, without the 'u' flag, pcre treats strings as sequences of 1-byte chars. IMO we should get rid of $g_wrap_in_preformatted_text, and add CSS 'overflow-x' attribute to 'pre' tags. |
|
Can we fix the 'u' in current 1.3.x |
|
Follow-up issue: 0021594 |
|
MantisBT: master-1.3.x ba89d0e1 2016-08-09 05:16 Details Diff |
Prevent unwanted line breaks in <pre> tags By default, Mantis wraps text within <pre> tags at 100 chars (see $g_wrap_in_preformatted_text option). If the text within the tag contains Unicode extended characters, the regex performing the wrap does not count them properly, as pcre works on bytes, causing line breaks to be added in the wrong place. Adding 'u' modifier to the regex fixes the behavior, as suggested by cproensa. Fixes 0021410 |
Affected Issues 0021410 |
|
mod - core/string_api.php | Diff File |