[xwiki-devs] [VOTE] Allow adding new link/images resource types in XWiki Syntax 2.1 or not
Hi devs, I’ve just committed support for http://jira.xwiki.org/browse/XRENDERING-278 (which allows copy pasting images in the WYSIWYG editor btw). However I’ve just realized (had forgotten) that my code will break image attachments to a subwiki named “data”: image:data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAO9JREFUOE+lUrsNwjAUdCyWIBXjIEokVoCejgkyQ2gYAIkSsQUrUIUxwrund5bjX4OlyPG9u3v22Z2rjM1uWEtpkq//PC/fCs35UoHi/WGL8mTrErVsAJGJHU2KagGzHUi3I8iP+0s1nInXjBSPSfI/n2/vGTNFJZOVCRkYltdGl1FMRqmHYL0FFM6MjnFXaxCwNJMOZAbW6JyVkI1cbwcD3T5MGBjZLQxi8Lw9kp5iFFikUYwZr2dNQzQT7EavsDFOwl2ErNuIh5kgaX1E0bEyMTiZAcA0WAa26GSL7CUaHjJJz1wyqWLpe6gS/yn8AD9tcjFN7/ajAAAAAElFTkSuQmCC Of course the solution for a user is to prefix with “attach:”, to show that it’s an image coming from an attachment: image:attach:data:…. We discussed this previously: * Original thread: http://markmail.org/thread/vw3derowozijqalr * This lead to this first VOTE which was not conclusive: http://markmail.org/thread/vw3derowozijqalr * Which lead to another VOTE which was also not conclusive: http://markmail.org/thread/t2wb2xq7534qsshg (note that this thread contains 2 proposals, the last one beeing a choice between A) and B)). However we kind of agreed at the end that it would be acceptable to break backward compatibility (solution A in the last thread). So the question here: * Should I revert my change that I did for 5.4? * Is it ok to break backward compatibility and thus add this in XWiki Syntax 2.1 as I did and document it on the release notes? Note that I could also relatively easily implement a new rendering configuration option (e.g. rendering.ignoreResourceTypes=user,data) which would be optional and that would allow to ignore some resource types (IMO this is slightly overkill). WDYT? Thanks -Vincent
On 01/16/2014 07:58 AM, vincent@massol.net wrote:
Hi devs,
I’ve just committed support for http://jira.xwiki.org/browse/XRENDERING-278 (which allows copy pasting images in the WYSIWYG editor btw). However I’ve just realized (had forgotten) that my code will break image attachments to a subwiki named “data”:
image:data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAO9JREFUOE+lUrsNwjAUdCyWIBXjIEokVoCejgkyQ2gYAIkSsQUrUIUxwrund5bjX4OlyPG9u3v22Z2rjM1uWEtpkq//PC/fCs35UoHi/WGL8mTrErVsAJGJHU2KagGzHUi3I8iP+0s1nInXjBSPSfI/n2/vGTNFJZOVCRkYltdGl1FMRqmHYL0FFM6MjnFXaxCwNJMOZAbW6JyVkI1cbwcD3T5MGBjZLQxi8Lw9kp5iFFikUYwZr2dNQzQT7EavsDFOwl2ErNuIh5kgaX1E0bEyMTiZAcA0WAa26GSL7CUaHjJJz1wyqWLpe6gS/yn8AD9tcjFN7/ajAAAAAElFTkSuQmCC
Of course the solution for a user is to prefix with “attach:”, to show that it’s an image coming from an attachment:
image:attach:data:….
We discussed this previously: * Original thread: http://markmail.org/thread/vw3derowozijqalr * This lead to this first VOTE which was not conclusive: http://markmail.org/thread/vw3derowozijqalr * Which lead to another VOTE which was also not conclusive: http://markmail.org/thread/t2wb2xq7534qsshg (note that this thread contains 2 proposals, the last one beeing a choice between A) and B)).
However we kind of agreed at the end that it would be acceptable to break backward compatibility (solution A in the last thread).
So the question here:
* Should I revert my change that I did for 5.4? * Is it ok to break backward compatibility and thus add this in XWiki Syntax 2.1 as I did and document it on the release notes?
Note that I could also relatively easily implement a new rendering configuration option (e.g. rendering.ignoreResourceTypes=user,data) which would be optional and that would allow to ignore some resource types (IMO this is slightly overkill).
WDYT?
Thanks -Vincent
+1 for breaking backwards compatibility. Would it be possible to also check if what's after "data:" starts with "image/"? The chances of having a "data" wiki, and a space with / in it are pretty slim, considering that / isn't quite working in both Tomcat and Apache HTTPD. -- Sergiu Dumitriu http://purl.org/net/sergiu
There is two questions here: * is it OK to add new resource types dynamically ? and for me it's OK * is it OK to introduce it in 5.4 ? and given the fact that you feel the need to send that mail it seems to me you should probably wait for 6.0 since you insisted yourself of being extra careful with what we put in 5.x. On Thu, Jan 16, 2014 at 3:02 PM, Sergiu Dumitriu <sergiu@xwiki.com> wrote:
On 01/16/2014 07:58 AM, vincent@massol.net wrote:
Hi devs,
I’ve just committed support for http://jira.xwiki.org/browse/XRENDERING-278 (which allows copy pasting images in the WYSIWYG editor btw). However I’ve just realized (had forgotten) that my code will break image attachments to a subwiki named “data”:
image:data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAO9JREFUOE+lUrsNwjAUdCyWIBXjIEokVoCejgkyQ2gYAIkSsQUrUIUxwrund5bjX4OlyPG9u3v22Z2rjM1uWEtpkq//PC/fCs35UoHi/WGL8mTrErVsAJGJHU2KagGzHUi3I8iP+0s1nInXjBSPSfI/n2/vGTNFJZOVCRkYltdGl1FMRqmHYL0FFM6MjnFXaxCwNJMOZAbW6JyVkI1cbwcD3T5MGBjZLQxi8Lw9kp5iFFikUYwZr2dNQzQT7EavsDFOwl2ErNuIh5kgaX1E0bEyMTiZAcA0WAa26GSL7CUaHjJJz1wyqWLpe6gS/yn8AD9tcjFN7/ajAAAAAElFTkSuQmCC
Of course the solution for a user is to prefix with “attach:”, to show that it’s an image coming from an attachment:
image:attach:data:….
We discussed this previously: * Original thread: http://markmail.org/thread/vw3derowozijqalr * This lead to this first VOTE which was not conclusive: http://markmail.org/thread/vw3derowozijqalr * Which lead to another VOTE which was also not conclusive: http://markmail.org/thread/t2wb2xq7534qsshg (note that this thread contains 2 proposals, the last one beeing a choice between A) and B)).
However we kind of agreed at the end that it would be acceptable to break backward compatibility (solution A in the last thread).
So the question here:
* Should I revert my change that I did for 5.4? * Is it ok to break backward compatibility and thus add this in XWiki Syntax 2.1 as I did and document it on the release notes?
Note that I could also relatively easily implement a new rendering configuration option (e.g. rendering.ignoreResourceTypes=user,data) which would be optional and that would allow to ignore some resource types (IMO this is slightly overkill).
WDYT?
Thanks -Vincent
+1 for breaking backwards compatibility.
Would it be possible to also check if what's after "data:" starts with "image/"? The chances of having a "data" wiki, and a space with / in it are pretty slim, considering that / isn't quite working in both Tomcat and Apache HTTPD.
+1, you should check if what you have is a valid data as much as possible
-- Sergiu Dumitriu http://purl.org/net/sergiu _______________________________________________ devs mailing list devs@xwiki.org http://lists.xwiki.org/mailman/listinfo/devs
-- Thomas Mortagne
On 16 Jan 2014 at 15:02:10, Sergiu Dumitriu (sergiu@xwiki.com(mailto://sergiu@xwiki.com)) wrote:
On 01/16/2014 07:58 AM, vincent@massol.net wrote:
Hi devs,
I’ve just committed support for http://jira.xwiki.org/browse/XRENDERING-278 (which allows copy pasting images in the WYSIWYG editor btw). However I’ve just realized (had forgotten) that my code will break image attachments to a subwiki named “data”:
image:data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAO9JREFUOE+lUrsNwjAUdCyWIBXjIEokVoCejgkyQ2gYAIkSsQUrUIUxwrund5bjX4OlyPG9u3v22Z2rjM1uWEtpkq//PC/fCs35UoHi/WGL8mTrErVsAJGJHU2KagGzHUi3I8iP+0s1nInXjBSPSfI/n2/vGTNFJZOVCRkYltdGl1FMRqmHYL0FFM6MjnFXaxCwNJMOZAbW6JyVkI1cbwcD3T5MGBjZLQxi8Lw9kp5iFFikUYwZr2dNQzQT7EavsDFOwl2ErNuIh5kgaX1E0bEyMTiZAcA0WAa26GSL7CUaHjJJz1wyqWLpe6gS/yn8AD9tcjFN7/ajAAAAAElFTkSuQmCC
Of course the solution for a user is to prefix with “attach:”, to show that it’s an image coming from an attachment:
image:attach:data:….
We discussed this previously: * Original thread: http://markmail.org/thread/vw3derowozijqalr * This lead to this first VOTE which was not conclusive: http://markmail.org/thread/vw3derowozijqalr * Which lead to another VOTE which was also not conclusive: http://markmail.org/thread/t2wb2xq7534qsshg (note that this thread contains 2 proposals, the last one beeing a choice between A) and B)).
However we kind of agreed at the end that it would be acceptable to break backward compatibility (solution A in the last thread).
So the question here:
* Should I revert my change that I did for 5.4? * Is it ok to break backward compatibility and thus add this in XWiki Syntax 2.1 as I did and document it on the release notes?
Note that I could also relatively easily implement a new rendering configuration option (e.g. rendering.ignoreResourceTypes=user,data) which would be optional and that would allow to ignore some resource types (IMO this is slightly overkill).
WDYT?
Thanks -Vincent
+1 for breaking backwards compatibility.
Would it be possible to also check if what's after "data:" starts with "image/"? The chances of having a "data" wiki, and a space with / in it are pretty slim, considering that / isn't quite working in both Tomcat and Apache HTTPD.
Yes good idea. I’ve committed it With this in place the likelihood of a backward compatibility issue is close to 0% so I think we’re safe to include this change in 5.4. Thanks -Vincent
On 01/16/2014 09:38 AM, vincent@massol.net wrote:
On 16 Jan 2014 at 15:02:10, Sergiu Dumitriu (sergiu@xwiki.com(mailto://sergiu@xwiki.com)) wrote:
On 01/16/2014 07:58 AM, vincent@massol.net wrote:
Hi devs,
I’ve just committed support for http://jira.xwiki.org/browse/XRENDERING-278 (which allows copy pasting images in the WYSIWYG editor btw). However I’ve just realized (had forgotten) that my code will break image attachments to a subwiki named “data”:
image:data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAO9JREFUOE+lUrsNwjAUdCyWIBXjIEokVoCejgkyQ2gYAIkSsQUrUIUxwrund5bjX4OlyPG9u3v22Z2rjM1uWEtpkq//PC/fCs35UoHi/WGL8mTrErVsAJGJHU2KagGzHUi3I8iP+0s1nInXjBSPSfI/n2/vGTNFJZOVCRkYltdGl1FMRqmHYL0FFM6MjnFXaxCwNJMOZAbW6JyVkI1cbwcD3T5MGBjZLQxi8Lw9kp5iFFikUYwZr2dNQzQT7EavsDFOwl2ErNuIh5kgaX1E0bEyMTiZAcA0WAa26GSL7CUaHjJJz1wyqWLpe6gS/yn8AD9tcjFN7/ajAAAAAElFTkSuQmCC
Of course the solution for a user is to prefix with “attach:”, to show that it’s an image coming from an attachment:
image:attach:data:….
We discussed this previously: * Original thread: http://markmail.org/thread/vw3derowozijqalr * This lead to this first VOTE which was not conclusive: http://markmail.org/thread/vw3derowozijqalr * Which lead to another VOTE which was also not conclusive: http://markmail.org/thread/t2wb2xq7534qsshg (note that this thread contains 2 proposals, the last one beeing a choice between A) and B)).
However we kind of agreed at the end that it would be acceptable to break backward compatibility (solution A in the last thread).
So the question here:
* Should I revert my change that I did for 5.4? * Is it ok to break backward compatibility and thus add this in XWiki Syntax 2.1 as I did and document it on the release notes?
Note that I could also relatively easily implement a new rendering configuration option (e.g. rendering.ignoreResourceTypes=user,data) which would be optional and that would allow to ignore some resource types (IMO this is slightly overkill).
WDYT?
Thanks -Vincent
+1 for breaking backwards compatibility.
Would it be possible to also check if what's after "data:" starts with "image/"? The chances of having a "data" wiki, and a space with / in it are pretty slim, considering that / isn't quite working in both Tomcat and Apache HTTPD.
Yes good idea. I’ve committed it
With this in place the likelihood of a backward compatibility issue is close to 0% so I think we’re safe to include this change in 5.4.
Thanks -Vincent
One concern with inline images is that they could be quite big, and the maximum width of the XWD_CONTENT column isn't that large (200k). One modest PNG could easily fill that up, so maybe we should increase that column? I would even go for a CLOB, but that would break backwards compatibility, and at least one feature that will break is the DatabaseSearch. This needs a separate vote, if we're seriously considering making such a change. And definitely not something for 5.x. -- Sergiu Dumitriu http://purl.org/net/sergiu
On 16 Jan 2014 at 15:50:11, Sergiu Dumitriu (sergiu@xwiki.com(mailto://sergiu@xwiki.com)) wrote:
On 01/16/2014 09:38 AM, vincent@massol.net wrote:
On 16 Jan 2014 at 15:02:10, Sergiu Dumitriu (sergiu@xwiki.com(mailto://sergiu@xwiki.com)) wrote:
On 01/16/2014 07:58 AM, vincent@massol.net wrote:
Hi devs,
I’ve just committed support for http://jira.xwiki.org/browse/XRENDERING-278 (which allows copy pasting images in the WYSIWYG editor btw). However I’ve just realized (had forgotten) that my code will break image attachments to a subwiki named “data”:
image:data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABHNCSVQICAgIfAhkiAAAAO9JREFUOE+lUrsNwjAUdCyWIBXjIEokVoCejgkyQ2gYAIkSsQUrUIUxwrund5bjX4OlyPG9u3v22Z2rjM1uWEtpkq//PC/fCs35UoHi/WGL8mTrErVsAJGJHU2KagGzHUi3I8iP+0s1nInXjBSPSfI/n2/vGTNFJZOVCRkYltdGl1FMRqmHYL0FFM6MjnFXaxCwNJMOZAbW6JyVkI1cbwcD3T5MGBjZLQxi8Lw9kp5iFFikUYwZr2dNQzQT7EavsDFOwl2ErNuIh5kgaX1E0bEyMTiZAcA0WAa26GSL7CUaHjJJz1wyqWLpe6gS/yn8AD9tcjFN7/ajAAAAAElFTkSuQmCC
Of course the solution for a user is to prefix with “attach:”, to show that it’s an image coming from an attachment:
image:attach:data:….
We discussed this previously: * Original thread: http://markmail.org/thread/vw3derowozijqalr * This lead to this first VOTE which was not conclusive: http://markmail.org/thread/vw3derowozijqalr * Which lead to another VOTE which was also not conclusive: http://markmail.org/thread/t2wb2xq7534qsshg (note that this thread contains 2 proposals, the last one beeing a choice between A) and B)).
However we kind of agreed at the end that it would be acceptable to break backward compatibility (solution A in the last thread).
So the question here:
* Should I revert my change that I did for 5.4? * Is it ok to break backward compatibility and thus add this in XWiki Syntax 2.1 as I did and document it on the release notes?
Note that I could also relatively easily implement a new rendering configuration option (e.g. rendering.ignoreResourceTypes=user,data) which would be optional and that would allow to ignore some resource types (IMO this is slightly overkill).
WDYT?
Thanks -Vincent
+1 for breaking backwards compatibility.
Would it be possible to also check if what's after "data:" starts with "image/"? The chances of having a "data" wiki, and a space with / in it are pretty slim, considering that / isn't quite working in both Tomcat and Apache HTTPD.
Yes good idea. I’ve committed it
With this in place the likelihood of a backward compatibility issue is close to 0% so I think we’re safe to include this change in 5.4.
Thanks -Vincent
One concern with inline images is that they could be quite big, and the maximum width of the XWD_CONTENT column isn't that large (200k). One modest PNG could easily fill that up, so maybe we should increase that column? I would even go for a CLOB, but that would break backwards compatibility, and at least one feature that will break is the DatabaseSearch.
This needs a separate vote, if we're seriously considering making such a change. And definitely not something for 5.x.
Good point. Thanks -Vincent
participants (3)
-
Sergiu Dumitriu -
Thomas Mortagne -
vincent@massol.net