Skip to content
Snippets Groups Projects
Commit c3640f60 authored by srosse's avatar srosse
Browse files

OO-3876: allow HTML code if the length is shorter than 256 characters

parent 59c7285f
No related branches found
No related tags found
No related merge requests found
...@@ -303,8 +303,10 @@ public class EnrollmentManager { ...@@ -303,8 +303,10 @@ public class EnrollmentManager {
String name = (String)row[1]; String name = (String)row[1];
String desc = (String)row[2]; String desc = (String)row[2];
if(StringHelper.containsNonWhitespace(desc) && descriptionMaxSize > 0) { if(StringHelper.containsNonWhitespace(desc) && descriptionMaxSize > 0) {
desc = FilterFactory.getHtmlTagsFilter().filter(desc); String asciiDesc = FilterFactory.getHtmlTagsFilter().filter(desc);
desc = Formatter.truncate(desc, 256); if(asciiDesc.length() > descriptionMaxSize) {
desc = Formatter.truncate(asciiDesc, descriptionMaxSize);
}
} }
int maxParticipants = row[3] == null ? -1 : ((Number)row[3]).intValue(); int maxParticipants = row[3] == null ? -1 : ((Number)row[3]).intValue();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment