Here’s a summary of changes in each release. The list doesn’t include some small changes or updates to test cases.
Version 3.5.3 – upcoming
- Fix double image URL encoding (closes #102.)
- Fix URL reference token spoofing.
- Fix broken parser output when $strict argument was set to TRUE (closes #119.)
- Fix memory leaking tag cache. Tag cache is never reset between
textileRestricted()calls referencing the same instance.
- Fix rare instances where a link displays a wrong URL mentioned elsewhere in the document.
- Link aliases follow same allowed URL schemes as normal links.
fPBr()to detect a wider range of raw HTML and XHTML.
- Unify attribute order with Redcloth.
- Improved support for Redcloth-style definition lists.
- Allow multiple terms
- Allow linebreaks in terms
- Fix incorrectly rendered
relattributes (closes #103.)
getSymbol()so it actually returns the named symbol (closes #104.)
- Fix unicode link aliases that were broken on some PCRE_UTF8 supporting systems.
- Fix collapsing whitespace and preserve newlines. Preserves whitespace inside long
preblocks, rather than collapsing two or more empty lines down to one. Renders whitespace as it was defined, rather than using hard-coded single LF to separate lines (closes #109 and #111.)
- Fix the number of code tags rendered inside long code blocks (closes #116.)
- Fix token spoofing from the document body by randomizing token references (closes #115.)
- Add image dimensions to images even when Textile is run on command line. On CLI, images are looked from the current working directory.
- Define internal class properties as protected rather than at all, causing them to be created as public.
- Move internal property definitions from the constructor to class definition.
- Added runnable PHPUnit tests, integration with Travis CI.
- Removed error suppression, the code doesn’t intentionally produce notices.
brtags to headings instead of leaving linebreaks untouched.
- Remove horizontal alignment from inline elements (closes #66.)
- Reinstate automatic generation of image width and height generation for relative images (closes #101.)
- Add setDimensionlessImages() and getDimensionlessImages() to suppress width and height generation for relative images and better support content for responsive layouts (closes #100.)
- Allow “.” in class attributes (closes #97.)
- Add composer.json to allow installation via the Composer PHP package manager.
- Regular expression improvements (issues #78, #81 and #83.)
- Allow pre-encoded
- Self-referencing links can now be combined with link aliases. eg.
"$":alias1is now possible.
- Fix memory leak and performance degradation when calling same Textile object multiple times.
- Do not double-encode
- Remove legacy SVN lines and old Textpattern integration methods.
- Refactored code, removing deprecated methods.
- Fix undefined variable in Redcloth-style definition lists.
- Improvements to image handling (closes #69).
- Extend recognition of dimension sign to more complex cases. Eg…
-0.5 x -.1 x +100=> -0.5 × -.1 × +100
10 x -€ 110,00=> 10 × -€ 110,00 (this replacement is available only if unicode support is included in your PCRE implementation and any character that is a currency symbol should work)
- Change parse tokens to further prevent glyphs from matching them internally.
- Improve handling of textile within table cells without leading or trailing spaces (eg.
|"$":https://github.com"|_Here we are_|==code==|etc.)
- Improve handling of lists within table cells. (closes #79)
- Allow mixed nested lists (Already supported in Redcloth).
- Improve detection of open quotes in situations like
["(Berk.) Hilton"](where the open quote was previously was incorrectly detected encoded.)
- Fix a problem with links followed by ‘:’, ‘;’ or ‘?’ like
Do you like "cheese":/cheese?where the ‘?’ becomes part of the href rather than a ‘?’ at the end of the sentence. This happens on platforms where PCRE has unicode support.
- Removal of leading \t from generated paragraphs & better indentation of generated lists in the HTML (closes #90.)
- New method
textileEncode(). This is preferred to calling
textileThis()with the $encode flag.
- PSR-0, PSR-1 & PSR-2 conformity added.
- Split class Textile into classes
Tagand moved them into
src/Netcarver/Textiledirectory for PSR-0.
- Unified method names & coding styles according to PSR-1 & PSR-2.
- Switched from using defines to explicit set methods;
- Added visibility controls to all properties and methods.
- Split class Textile into classes
- Dropped textile’s PHP4 heritage and moved over to using a
fileschemes to the URI whitelist in unrestricted mode.
- Support international format
telURIs via linkrefs (link aliases.)
- Extend linkrefs to all available URI schemes in unrestricted mode.
- Reverted looser matching of list-like structures as it introduced problems in block-level elements that
can legitimately have literals or other non-lists in them that are similar to textile’s lists.
See issue #65 for some examples.
- Fixed #61 which caused strong numeric strings at the start of a line to be turned into lists.
- Reverted auto-breaking in table cells as it introduced #71 (breaking lists within table cells).
- Fixed #67 which ran textile within table cells through the glyph routine twice.
- Conditionally use utf8 in span regex pattern. Closes #53.
- Small code cleanups
- Convert \n to
<br/>inside table rows.
- Added HTML comment block handling.
- Added ability to control the start attribute and continuation of ordered lists.
- Adds basic Redcloth-style definition list support.
- Add ability to customise footnote refs and anchors.
- Add https protocol to linkrefs.
- Add unicode support for linkref urls.
- Added redcloth style list continuation.
- Loosen recognition of notedefs and notelists.
- Better recognition of lists adjoined to previous text. (This was reverted in 2.4.1 as it caused issues inside block elements like bc. or bq.)
- Bugfix: allow apostrophe between ) and a word character.
- Allow notelist refs to be customised.
- Allow multiple classes in block attributes.
- Improve handling of (classA classB#Bad id) blocks.
- Add span $tail fix & support for trailing [ in spans.
- Add doctype to textile constructor & use abbr instead of acronym for html5 doctypes.
- HTML5 doctype extends class rather than use invalid align attribute.
- Allow auto-assigned classes to be output in restricted mode.
- Add support for encoding Unicode characters in links.
- Notelists: fix order of
a. Fixes issue #20
- Add simple set of symbols ¤§µ¶†‡•∗∴◊♠♣♥♦ to notelist regex. Requested in #38
- Remove attributes from embedded code tag output by bc.
- Simplify en-dash glyph rule — should fix #50
- Simplify self-hyperlinked text, remove the scheme for http, https, ftp and mailto link text.
- Fix potential DoS in cleanba().
- Fix the issue where class would eat the note label.
- Sanitise image URLs.
- Allow inline span tags to be applied within non-English quotation marks.
- Allow non-English quotation marks inside inline span tags.
- Allow pipe closure of captions.
- Allow missing closing pipe in colgroups.
- Note-style links can use index 0.
- Encode quotes in restricted mode, rather than improperly leaving them as is.
- Improve lang, style, id and class handling.
- Add rel attributes to linked images.
- Center aligned cells aren’t treated as captions.
- Removed use of deprecated
- Disallow unsafe block attributes in restricted mode.
- Allow duplicate notelists with different backref characters.
- Properly render empty table cells.
- Add support for glyphs such as fractions, plus-minus and degrees.
- Optimize glyph encoding setup.
- Optimize style attribute processing.
- Less restrictive paragraph breaking.
- Output cleaner inline styles.
- More restrictive apostrophe encoding and matching.
- Remove horizontal and vertical alignment attributes from list elements.
- Lists can use dot terminator.
- Improved table generation: allow linebreaks in table cells, colgroups, thead, tbody and tfoot elements.
- Add auto-numbered notelists.
- Add Textile comment tag. Comments aren’t displayed in the generated markup.
- Add self-links where the URL can be used with the link text (
- Allow glyph parsing across tag boundaries.
- Add definition lists.
- Fix duplicate IDs in footnotes.
- Caps span isn’t added to acronyms.