@@ -19,7 +19,7 @@ function introspect(&$propbag)
19
19
$ propbag ->add ('description ' , PLUGIN_EVENT_TEXTILE_DESC );
20
20
$ propbag ->add ('stackable ' , false );
21
21
$ propbag ->add ('author ' , 'Serendipity Team ' , 'Lars Strojny ' );
22
- $ propbag ->add ('version ' , '2.0 ' );
22
+ $ propbag ->add ('version ' , '2.0.1 ' );
23
23
$ propbag ->add ('requirements ' , array (
24
24
'serendipity ' => '1.6 ' ,
25
25
'smarty ' => '2.6.7 ' ,
@@ -112,6 +112,9 @@ function introspect_config_item($name, &$propbag)
112
112
$ propbag ->add ('description ' , PLUGIN_EVENT_TEXTILE_UNESCAPE_DESC );
113
113
$ propbag ->add ('default ' , 'false ' );
114
114
break ;
115
+ case 'textile_version ' :
116
+ // For backwards compatibility, otherwise the constant call below will die
117
+ break ;
115
118
116
119
default :
117
120
$ propbag ->add ('type ' , 'boolean ' );
@@ -165,7 +168,7 @@ function event_hook($event, &$bag, &$eventData, $addData = null)
165
168
166
169
/* textile it */
167
170
168
- if (serendipity_db_bool ($ this ->get_config ('unescape ' ))) {
171
+ if (serendipity_db_bool ($ this ->get_config ('unescape ' )) && isset ( $ eventData [ $ element ]) ) {
169
172
$ eventData [$ element ] = str_replace ('" ' , '" ' , $ eventData [$ element ]);
170
173
}
171
174
$ eventData [$ element ] = $ this ->textile ($ eventData [$ element ] ?? null );
@@ -200,11 +203,8 @@ function event_hook($event, &$bag, &$eventData, $addData = null)
200
203
break ;
201
204
202
205
case 'frontend_comment ' :
203
- if (serendipity_db_bool ($ this ->get_config ('COMMENT ' , 'true ' ))) {
204
- $ url = $ this ->get_config ('textile_version ' ) == 1
205
- ? 'http://www.textism.com/tools/textile/ '
206
- : 'http://txstyle.org/article/43/a-short-introduction ' ;
207
- echo '<div class="serendipity_commentDirection serendipity_comment_textile"> ' . sprintf (PLUGIN_EVENT_TEXTILE_TRANSFORM , $ url ) . '</div> ' ;
206
+ if (serendipity_db_bool ($ this ->get_config ('COMMENT ' , 'true ' ))) {;
207
+ echo '<div class="serendipity_commentDirection serendipity_comment_textile"> ' . sprintf (PLUGIN_EVENT_TEXTILE_TRANSFORM , 'https://textile-lang.com/ ' ) . '</div> ' ;
208
208
}
209
209
break ;
210
210
0 commit comments