arturobernalg opened a new pull request, #544:
URL: https://github.com/apache/jspwiki/pull/544

   Pasting an image in the WYSIWYG editor stores it as 
[data:image/png;base64,...]. The parser took the data: prefix for an InterWiki 
name and reported that no InterWiki reference called data exists, and the Image 
plugin replaced any src starting with data with an invalid URL.
   
   When inline images are enabled, a base64 data URL of a PNG, GIF, JPEG or 
WebP image is now rendered as an inline image, with an empty alt text unless 
one is given. Such a link is not recorded as an external link. Everything else 
stays as it was: other data URLs, SVG included, are not rendered, and the link 
attribute of the Image plugin is still sanitized.
   
   The image stays inside the page text. Storing a pasted image as an 
attachment, which the issue mentions as an option, is not part of this change.
   
   Tests: 3 new cases in JSPWikiMarkupParserTest and 3 in ImageTest, including 
the data URLs that must stay blocked (text/html, SVG, no base64, an attribute 
break-out attempt, and the link of the Image plugin). The positive ones fail 
without the change. The jspwiki-util, jspwiki-event and jspwiki-main suites 
pass.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to