Index: trunk/extensions/ArticleComments/ArticleComments.php |
— | — | @@ -22,6 +22,8 @@ |
23 | 23 | * <comments /> |
24 | 24 | * Note: Typically this would be placed at the end of the article text. |
25 | 25 | * Version Notes: |
| 26 | + * version 0.5.1: |
| 27 | + * Removed the base64 pass |
26 | 28 | * version 0.5: |
27 | 29 | * Updated to work with MediaWiki 1.16+ |
28 | 30 | * version 0.4.3: |
— | — | @@ -81,7 +83,7 @@ |
82 | 84 | 'author' => 'Jim R. Wilson - wilson.jim.r <at> gmail.com', |
83 | 85 | 'url' => 'http://jimbojw.com/wiki/index.php?title=ArticleComments', |
84 | 86 | 'descriptionmsg' => 'article-comments-desc', |
85 | | - 'version' => '0.5' |
| 87 | + 'version' => '0.5.1' |
86 | 88 | ); |
87 | 89 | |
88 | 90 | # Add Extension Functions |
— | — | @@ -91,7 +93,6 @@ |
92 | 94 | # Attach Hooks |
93 | 95 | $wgHooks['ParserFirstCallInit'][] = 'wfArticleCommentsParserSetup'; |
94 | 96 | $wgHooks['SkinAfterContent'][] = 'wfArticleCommentsAfterContent'; |
95 | | -$wgHooks['ParserAfterTidy'][] = 'wfProcessEncodedContent'; |
96 | 97 | $wgHooks['ArticleCommentsSpamCheck'][] = 'defaultArticleCommentSpamCheck'; |
97 | 98 | |
98 | 99 | /** |
— | — | @@ -126,11 +127,7 @@ |
127 | 128 | |
128 | 129 | function wfArticleCommentsParserHook( $text, $params = array(), $parser ) { |
129 | 130 | # Generate a comment form for display |
130 | | - $commentForm = wfArticleCommentForm( $parser->mTitle, $params ); |
131 | | - |
132 | | - # Hide content from the Parser using base64 to avoid mangling. |
133 | | - # Note: Content will be decoded after Tidy has finished its processing of the page. |
134 | | - return '<pre>@ENCODED@' . base64_encode( $commentForm ) . '@ENCODED@</pre>'; |
| 131 | + return wfArticleCommentForm( $parser->mTitle, $params ); |
135 | 132 | } |
136 | 133 | |
137 | 134 | /** |
— | — | @@ -269,22 +266,6 @@ |
270 | 267 | } |
271 | 268 | |
272 | 269 | /** |
273 | | - * Processes HTML comments with encoded content. |
274 | | - * Usage: $wgHooks['OutputPageBeforeHTML'][] = 'wfProcessEncodedContent'; |
275 | | - * @param OutputPage $out Handle to an OutputPage object presumably $wgOut (passed by reference). |
276 | | - * @param String $text Article/Output text (passed by reference) |
277 | | - * @return Boolean Always tru to give other hooking methods a chance to run. |
278 | | - */ |
279 | | -function wfProcessEncodedContent( $out, $text ) { |
280 | | - $text = preg_replace( |
281 | | - '/<pre>\n@ENCODED@([0-9a-zA-Z\\+\\/]+=*)@ENCODED@\n<\\/pre>/e', |
282 | | - 'base64_decode("$1")', |
283 | | - $text |
284 | | - ); |
285 | | - return true; |
286 | | -} |
287 | | - |
288 | | -/** |
289 | 270 | * Special page for comment processing. |
290 | 271 | */ |
291 | 272 | function specialProcessComment() { |