Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
OLAT CI-CD Testing Project
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Monitor
Service Desk
Analyze
Contributor analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Lars Oliver Dam
OLAT CI-CD Testing Project
Commits
13047edb
Commit
13047edb
authored
11 years ago
by
srosse
Browse files
Options
Downloads
Patches
Plain Diff
OO-801: filter the buggy conditional comment
parent
fe818949
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/main/java/org/olat/core/gui/components/form/flexible/impl/elements/richText/RichTextElementImpl.java
+17
-4
17 additions, 4 deletions
.../flexible/impl/elements/richText/RichTextElementImpl.java
with
17 additions
and
4 deletions
src/main/java/org/olat/core/gui/components/form/flexible/impl/elements/richText/RichTextElementImpl.java
+
17
−
4
View file @
13047edb
...
...
@@ -64,16 +64,29 @@ public class RichTextElementImpl extends AbstractTextElement implements
*/
@Override
public
String
getValue
()
{
Filter
xssFilter
=
FilterFactory
.
getXSSFilter
(
value
.
length
()
+
1
);
return
super
.
getValue
(
xssFilter
);
String
val
=
getRawValue
();
Filter
xssFilter
=
FilterFactory
.
getXSSFilter
(
val
.
length
()
+
1
);
return
xssFilter
.
filter
(
val
);
}
@Override
public
String
getValue
(
Filter
filter
)
{
String
val
=
getRawValue
();
return
filter
.
filter
(
val
);
}
/**
* This apply a filter to remove some buggy conditional comment
* of Word
*
* @see org.olat.core.gui.components.form.flexible.elements.RichTextElement#getRawValue()
*/
public
String
getRawValue
(){
return
this
.
value
;
@Override
public
String
getRawValue
()
{
if
(
value
!=
null
)
{
value
=
value
.
replace
(
"<!--[endif] -->"
,
"<![endif]-->"
);
}
return
value
;
}
/**
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment