diff --git a/CHANGELOG.textile b/CHANGELOG.textile index f7c2ba7..2c70a5a 100644 --- a/CHANGELOG.textile +++ b/CHANGELOG.textile @@ -5,6 +5,7 @@ Here's a summary of changes in each release. The list doesn't include some small h2. Version 4.1.0 - upcoming * Support @:@ and @!@ characters in CSS class names (closes "#224":https://github.com/textile/php-textile/issues/224). +* Support including textile escape sequences inside link title attribute (closes "#223":https://github.com/textile/php-textile/issues/223). h2. "Version 4.0.0 - 2022/12/03":https://github.com/textile/php-textile/releases/tag/v4.0.0 diff --git a/src/Netcarver/Textile/Parser.php b/src/Netcarver/Textile/Parser.php index c1ee035..1bb5c72 100644 --- a/src/Netcarver/Textile/Parser.php +++ b/src/Netcarver/Textile/Parser.php @@ -20,7 +20,7 @@ * Additions and fixes Copyright (c) 2010-17 Netcarver https://github.com/netcarver * Additions and fixes Copyright (c) 2011 Jeff Soo http://ipsedixit.net/ * Additions and fixes Copyright (c) 2012 Robert Wetzlmayr http://wetzlmayr.com/ - * Additions and fixes Copyright (c) 2012-19 Jukka Svahn http://rahforum.biz/ + * Additions and fixes Copyright (c) 2012-24 Jukka Svahn https://rahforum.biz/ * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: @@ -1981,6 +1981,9 @@ public function parse($text) $text = $this->retrieveTags($text); $text = $this->retrieveURLs($text); + // Replace shelved instances that were inside tag and link attributes. + $text = $this->retrieve($text); + $text = str_replace($this->getLineBreak(), $this->getLineBreak()."\n", $text); return $text; diff --git a/test/fixtures/issue-223.yaml b/test/fixtures/issue-223.yaml new file mode 100644 index 0000000..c763ae7 --- /dev/null +++ b/test/fixtures/issue-223.yaml @@ -0,0 +1,6 @@ +Support including escape sequences in titles: + input: | + "lorem(dolor ==@== sit)":#ipsum + + expect: | +