-
Bug
-
Resolution: Obsolete
-
Low
-
5.6.3, 5.7.4, 6.0.6
-
4
-
Severity 3 - Minor
-
0
-
Summary
Creating table element on Confluence page and then trying to get value field from REST API from the same page will result in additional div element around the table. And classes for table and td beeing changed.
Because of this behavior (additional div around the table and changing classes), multiple updates of the page trough REST API, with the same content, will cause an additional version of the page with no difference. If you would fire the PUT (update of the page) 10 times you would get 10 versions of the page. For comparison, if you update a page without the table in the body (value will stay same), the version will stay same, no matter how many PUT calls you make.
Environment
- Java 1.8.0_111
- H2 database
- Centos 7
Steps to Reproduce
- Create simple table element on page XXXX in source editor like this or by creating it with POST REST API:
<table class="wrapped"> <colgroup> <col/> </colgroup> <tbody> <tr> <td>123</td> </tr> </tbody> </table>
- When you try to get the content of value attribute from the page by reaching it trough REST API and URL like this "GET http://confluence:8090/rest/api/content/XXXX?expand=body.view" you will get additional HTML element around the actual table in response value and additional classes on table and TD elements:
<div class="table-wrap"> <table class="confluenceTable"> <colgroup> <col/> </colgroup> <tbody> <tr> <td class="confluenceTd">123</td> </tr> </tbody> </table> </div>
Expected Results
Trying to get value field trough REST API, you will get this response:
<table class="wrapped">
<colgroup> <col/> </colgroup>
<tbody>
<tr>
<td>123</td>
</tr>
</tbody>
</table>
Note
Updating the content of the page (without the table and lorem ipsum text) in UI with the same content will cause a new version of the page if you repeat that process with REST API version will not change and they should be same.
Workaround
No known workaround at the moment.
Still present in 8.5.22