Anonymous | Login
Project:
RSS
  
News | My View | View Issues | Roadmap | Summary

View Issue DetailsJump to Notes ] Issue History ] Print ]
ID
0037051
TypeCategorySeverityReproducibilityDate SubmittedLast Update
defect[Openbravo ERP] A. Platformmajoralways2017-10-11 11:012017-10-13 08:30
ReporterJONHMView Statuspublic 
Assigned Toinigosanchez 
PriorityhighResolutionfixedFixed in Version3.0PR18Q1
StatusclosedFix in branchFixed in SCM revisiona9040328c3f8
ProjectionnoneETAnoneTarget Version
OSAnyDatabaseAnyJava version
OS VersionDatabase versionAnt version
Product VersionSCM revision 
Review Assigned Toalostale
Web browser
ModulesCore
Regression level
Regression date
Regression introduced in release
Regression introduced by commit
Triggers an Emergency PackNo
Summary

0037051: Rich text area fields showed in grid mode could corrupt the visibility of the grid

DescriptionRich text area fields showed in grid mode could corrupt the visibility of the grid
Steps To Reproduce1) Create a new column in c_invoice table:
 ALTER TABLE c_invoice ADD COLUMN comment character varying(2000);

2) With a module in development open "Tables and columns" window and select c_invoice column. Press button 'Create Columns from DB'. Open 'comment' column and set its reference to 'Rich Text Area'

3)Then switch to "Windows, tabs and fields" window and select 'Sales Invoice' > Header and create the new column by pressing the button 'Create Fields'. Open 'comment' field and set its sequence number to 75.

4) Compile the application

5) Create some records in "Sales Invoice" window and show the new comment field in grid mode

- OPTION 1:

6.1) Set the comment of one of those records by running the attached query (with your c_invoice_id)


- OPTION 2:

6.2.1) Copy content from some email (from gmail) with no longer than 2000 characters (including HTML tags) into comment field and save the record.

6.2.2) Then modify that content by adding some more text or copying paragraphs


7) When opening again the "Sales Invoice" window, you will see the grid corrupted (see attached image)
Proposed SolutionAs this is a text field which can be copied with format easily by some email content, the HTML tags should be escaped.
TagsNo tags attached.
Attached Filespng file icon Screenshot from 2017-10-10 18-34-08.png [^] (153,250 bytes) 2017-10-11 11:01


 file icon sql_richtextarea [^] (2,065 bytes) 2017-10-11 11:05 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
(0099868)
hgbot (developer)
2017-10-11 17:57

Repository: erp/devel/pi
Changeset: a9040328c3f85086d728e0598bd00f768237f78f
Author: Inigo Sanchez <inigo.sanchez <at> openbravo.com>
Date: Wed Oct 11 17:34:31 2017 +0200
URL: http://code.openbravo.com/erp/devel/pi/rev/a9040328c3f85086d728e0598bd00f768237f78f [^]

Fixed issue 37051: Rich text area fields causes visibility problems in the grid

The problem was that the rich text area fields generated visibility problems in the grid under some circumstances.
(e.g. when a rich text area field has a carriage return or html tags such as div, br,etc.). A common usecase could
be when a text is copied from a website.

This visibility problems occurred because in form view this type of fields are visualized as a rich text editor and
html tags are supported but in grid view are visualized as a normal field in the grid and this html tags are not
properly handled by SC.

In order to avoid this grid visibility problems, when showing a rich text area field in grid view, now it is escaped
the html code. Visibility in form view is not changed. Now the problem has been fixed by taking account this situation
in getGridFieldProperties method of the RichTextUIDefinition reference.

---
M modules/org.openbravo.client.kernel/src/org/openbravo/client/kernel/reference/RichTextUIDefinition.java
---
(0099881)
alostale (developer)
2017-10-13 08:30

reviewed

tested: now in grid html tags are seen

- Issue History
Date Modified Username Field Change
2017-10-11 11:01 JONHM New Issue
2017-10-11 11:01 JONHM Assigned To => platform
2017-10-11 11:01 JONHM File Added: Screenshot from 2017-10-10 18-34-08.png
2017-10-11 11:01 JONHM Modules => Core
2017-10-11 11:01 JONHM Triggers an Emergency Pack => No
2017-10-11 11:05 JONHM File Added: sql_richtextarea
2017-10-11 11:24 JONHM Steps to Reproduce Updated View Revisions
2017-10-11 11:36 Practics Issue Monitored: Practics
2017-10-11 12:52 inigosanchez Status new => scheduled
2017-10-11 12:52 inigosanchez Assigned To platform => inigosanchez
2017-10-11 13:32 Practics Issue End Monitor: Practics
2017-10-11 17:43 inigosanchez Review Assigned To => alostale
2017-10-11 17:57 hgbot Checkin
2017-10-11 17:57 hgbot Note Added: 0099868
2017-10-11 17:57 hgbot Status scheduled => resolved
2017-10-11 17:57 hgbot Resolution open => fixed
2017-10-11 17:57 hgbot Fixed in SCM revision => http://code.openbravo.com/erp/devel/pi/rev/a9040328c3f85086d728e0598bd00f768237f78f [^]
2017-10-13 08:30 alostale Note Added: 0099881
2017-10-13 08:30 alostale Status resolved => closed
2017-10-13 08:30 alostale Fixed in Version => 3.0PR18Q1


Copyright © 2000 - 2009 MantisBT Group
Powered by Mantis Bugtracker