We're updating the issue view to help you get more done. 

@SafeHtml should support relative URLs

Description

HTML validation using @SafeHtml and JSoup does not support images with relative src. The problem seems to be that SafeHtmlValidator.getFragmentAsDocument sets the baseUri to "", which in turn leads to validation failure.

Setting the baseUri to some dummy data like http://localhost will pass the validation test. Would this be possible to set as standard or if not could you allow setting the baseUri in @SafeHtml?

Environment

None

Status

Assignee

Marko Bekhta

Reporter

Øyvind Horneland

Labels

None

Worked in

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Community Help Wanted

None

Suitable for new contributors

None

Requires Release Note

None

backportDecision

None

backportReEvaluate

None

Components

Fix versions

Affects versions

5.3.4.Final

Priority

Minor