drupal的模块儿article-4.6.0的bug修正

激活模块儿后,将Latest Article放在页面上,点击其“更多”
页面有显示:
XML Feed

一看html代码
原来上面这行html代码被编码了
html标记“<”、“>”都被编成&什么来着

仔细看了看article.module的代码
发现这个问题很容易解决
找到第162行
把这一句:
$body = theme(’box’, variable_get(’article_recent_box_title’, t(’Latest Articles’)), module_invoke(’node’, ‘title_list’, article_get_latest(variable_get(’article_recent_display’, ‘5′)), ”) . theme(’more_info’, l(”\"XML“, ‘article/feed’)));

改为:
$body = theme(’box’, variable_get(’article_recent_box_title’, t(’Latest Articles’)), module_invoke(’node’, ‘title_list’, article_get_latest(variable_get(’article_recent_display’, ‘5′)), ”) . theme(’more_info’, l(”\"XML“, ‘article/feed’, array(), NULL, NULL, FALSE, TRUE)));

就OK了
其实这里的原因在于l这个函数的调用
他缺省是要把字符串里的html代码编码的
我们调用的时候设定xxx=TRUE
这样不让系统给编码
所以就对了

Discussion Area - Leave a Comment




*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word