Груша HTML BBcode Гиперссылка - PullRequest
0 голосов
/ 13 июня 2010

Кто-нибудь использовал пакет PEAR HTML BBcode?

Я не очень понимаю, почему цель гиперссылки _blank не открывает новую вкладку в Firefox.

Фрагмент SQL INSERT (строка)

[url=http://site.com t=_blank]Link[/url]

PHP Требуется PEAR

require_once 'HTML/BBCodeParser.php';
$options = @parse_ini_file('BBCodeParser.ini');  
$parser = new HTML_BBCodeParser($options);
$parser->setText($text);
$parser->parse();
echo $parser->getParsed();

BBCodeParser.ini

[HTML_BBCodeParser]
; http://articles.sitepoint.com/article/bb-code-php-application/
; possible values: single|double
; use single or double quotes for attributes
quotestyle  = double

; possible values: all|nothing|strings
; quote all attribute values, none, or only the strings
quotewhat   = all

; the opening tag character
open        = "["

; the closing tag character
close       = "]"

; possible values: true|false
; use xml style closing tags for single html tags (<img> or <img />)
xmlclose    = true

; possible values: a comma seperated list of filters
; comma seperated list of filters to use
filters     = Basic,Extended,Links,Images,Lists
; filters     = Basic,Extended,Links,Images,Lists,Email,MyBB

1 Ответ

0 голосов
/ 20 февраля 2011

Кажется, код по умолчанию для /filter/links.php не содержит атрибута target в теге <a>.Если вы измените код тега <a> для добавления t => 'target=_blank', это должно помочь.

Я пока не уверен, как добавить дополнительные значения, такие как _self, _top или _parent.

...