Releases: rotexsoft/file-renderer
Releases · rotexsoft/file-renderer
Updated dev dependencies
No user impacting changes
Minor Tweak
Minor Tweak
Added hasPath
Added hasPath
Exception specificity
Changed exception thrown by __get from \Exception to \OutOfBoundsException.
Bug Fix.
Tweaked renderToString to truly make the five escaper methods available via $this->escape($string)* inside view files.
Added 5 escaper methods for manual escaping
Added 5 escaper methods to the Renderer Class:
$this->escapeHtml(string $some_string_variable):
an alias for PHP's htmlspecialchars() for escaping data which may contain html markup.$this->escapeHtmlAttr(string $some_string_variable):
for escaping data which is meant to be rendered as an attribute value within an html element in a view.$this->escapeCss(string $some_string_variable):
for escaping data which is meant to be rendered within<style>
tags or inside the style attribute of any html element.$this->escapeJs(string $some_string_variable):
for escaping data which is meant to be rendered as string literals or digits within Javascript code in a view.$this->escapeUrl(string $some_string_variable):
an alias for PHP's rawurlencode() for escaping data being inserted into a URL and not to the whole URL itself.
These methods can be called directly within views.
Also added __toString() which calls renderToString with no args.
Changed the visibility of Renderer::multi_escape_prevention_guard from public to protected.
Changed the visibility of Renderer::multi_escape_prevention_guard from public to protected.
Optimizations and Completed Documentation
- Optimized escapeData
- Improved API documentation in Renderer.php
- README.md Documentation is now complete
- Updated removeFirstNPaths and removeLastNPaths to return an array of the removed items.
Fixed warning message that occurs in escapeData if an empty data array is passed.
- Fixed warning message that occurs in escapeData if an empty data array is passed.
Wild card operator for Escape Specification
- Added ability to specify escaping on all fields using a wild card string.
- Fixed warning message that occurs in escapeData if an empty data array is passed.