diff options
Diffstat (limited to 'application/bookmark/LinkUtils.php')
-rw-r--r-- | application/bookmark/LinkUtils.php | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/application/bookmark/LinkUtils.php b/application/bookmark/LinkUtils.php index faf5dbfd..17c37979 100644 --- a/application/bookmark/LinkUtils.php +++ b/application/bookmark/LinkUtils.php | |||
@@ -138,12 +138,17 @@ function space2nbsp($text) | |||
138 | * | 138 | * |
139 | * @param string $description shaare's description. | 139 | * @param string $description shaare's description. |
140 | * @param string $indexUrl URL to Shaarli's index. | 140 | * @param string $indexUrl URL to Shaarli's index. |
141 | 141 | * @param bool $autolink Turn on/off automatic linkifications of URLs and hashtags | |
142 | * | ||
142 | * @return string formatted description. | 143 | * @return string formatted description. |
143 | */ | 144 | */ |
144 | function format_description($description, $indexUrl = '') | 145 | function format_description($description, $indexUrl = '', $autolink = true) |
145 | { | 146 | { |
146 | return nl2br(space2nbsp(hashtag_autolink(text2clickable($description), $indexUrl))); | 147 | if ($autolink) { |
148 | $description = hashtag_autolink(text2clickable($description), $indexUrl); | ||
149 | } | ||
150 | |||
151 | return nl2br(space2nbsp($description)); | ||
147 | } | 152 | } |
148 | 153 | ||
149 | /** | 154 | /** |