2010-06-13 7 views
0

누구나 PEAR HTML BBcode 패키지를 사용 했습니까?배 HTML BBcode 하이퍼 링크

하이퍼 링크 대상 _blank가 파이어 폭스에서 새 탭을 열지 못하는 이유를 정말로 이해하지 못합니다.

SQL 코드 조각 삽입 (문자열)

[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 

답변

0

/filter/links.php의 기본 코드가 <a> 태그에 target에 대한 속성을 포함하지 않는 것 같습니다. t => 'target=_blank'을 추가하기 위해 <a> 태그 코드를 변경하면 트릭을 수행해야합니다.

_self, _top 또는 _parent과 같은 추가 값을 추가하는 방법에 대해 아직 확실하지 않습니다.