Version 1.7.6
Table Field Pro 1.7.6 is now available and contains a security improvement for saving table content.
We recommend updating as soon as possible.
The change affects how table content is saved. In most cases you won't notice anything. If your tables contain HTML that is not allowed in normal post content, read the section below.
What's changing and who it affects
Table content is filtered when it is saved
Every text in the table data now runs through the WordPress function wp_kses_post() before the field is saved. This applies to every way a table is saved: the table editor, update_field(), the REST API and the GraphQL mutation. Only HTML that WordPress allows in post content is kept. For example, <script> tags and event attributes like onclick are removed.
This closes a gap where HTML could reach the database without being filtered on the server, for example through a request that doesn't come from the table editor.
You may be affected if your table cells contain markup that WordPress doesn't allow in post content, such as scripts or embedded iframes. Such markup is removed the next time the table is saved. Check the tables that use this kind of content after updating.
Other fixes
Line breaks in Simple Text cells are now output as <br> elements when the content type comes from the column or the table, and styles set on a column are added as a CSS class to the cells of that column in the get_table() output. The license check now shows a clear message when the license server receives too many requests. DOMPurify, the library that cleans the HTML of table cells in the editor, has been updated to the latest version.
Wrap up
Update from the Plugins page of your WordPress admin. If you find a security issue in Table Field Pro, please report it to us so we can fix it before it is made public.
Changelog
- Security – Every text in the table data is filtered with
wp_kses_post()before the field is saved. - Fix – Line breaks in Simple Text cells are output as
<br>elements when the content type comes from the column or the table. Before, this only worked when Simple Text was set directly on the row or cell. - Fix – Styles set on a column are added as a CSS class to the cells of that column in the
get_table()output. - Fix – Option containers in the table data are saved as objects, and the number of columns and rows as numbers.
- Fix – The Table Manager no longer causes a PHP error when no field name is given.
- Enhancement – The license check shows the message "Too many requests. Please try again later." when the license server limits the requests.
- Update – DOMPurify updated to 3.4.18.
Questions or problems after updating? Contact support.