| @@ 395-423 (lines=29) @@ | ||
| 392 | * |
|
| 393 | * @return string |
|
| 394 | */ |
|
| 395 | public function hometext($format = 'Show') |
|
| 396 | { |
|
| 397 | $myts = MyTextSanitizer::getInstance(); |
|
| 398 | $html = 1; |
|
| 399 | $smiley = 1; |
|
| 400 | $xcodes = 1; |
|
| 401 | if ($this->nohtml()) { |
|
| 402 | $html = 0; |
|
| 403 | } |
|
| 404 | if ($this->nosmiley()) { |
|
| 405 | $smiley = 0; |
|
| 406 | } |
|
| 407 | switch ($format) { |
|
| 408 | case 'Show': |
|
| 409 | $hometext = $myts->displayTarea($this->hometext, $html, $smiley, $xcodes); |
|
| 410 | break; |
|
| 411 | case 'Edit': |
|
| 412 | $hometext = htmlspecialchars($this->hometext, ENT_QUOTES); |
|
| 413 | break; |
|
| 414 | case 'Preview': |
|
| 415 | $hometext = $myts->previewTarea($this->hometext, $html, $smiley, $xcodes); |
|
| 416 | break; |
|
| 417 | case 'InForm': |
|
| 418 | $hometext = htmlspecialchars($myts->stripSlashesGPC($this->hometext), ENT_QUOTES); |
|
| 419 | break; |
|
| 420 | } |
|
| 421 | ||
| 422 | return $hometext; |
|
| 423 | } |
|
| 424 | ||
| 425 | /** |
|
| 426 | * @param string $format |
|
| @@ 430-458 (lines=29) @@ | ||
| 427 | * |
|
| 428 | * @return string |
|
| 429 | */ |
|
| 430 | public function bodytext($format = 'Show') |
|
| 431 | { |
|
| 432 | $myts = MyTextSanitizer::getInstance(); |
|
| 433 | $html = 1; |
|
| 434 | $smiley = 1; |
|
| 435 | $xcodes = 1; |
|
| 436 | if ($this->nohtml()) { |
|
| 437 | $html = 0; |
|
| 438 | } |
|
| 439 | if ($this->nosmiley()) { |
|
| 440 | $smiley = 0; |
|
| 441 | } |
|
| 442 | switch ($format) { |
|
| 443 | case 'Show': |
|
| 444 | $bodytext = $myts->displayTarea($this->bodytext, $html, $smiley, $xcodes); |
|
| 445 | break; |
|
| 446 | case 'Edit': |
|
| 447 | $bodytext = htmlspecialchars($this->bodytext, ENT_QUOTES); |
|
| 448 | break; |
|
| 449 | case 'Preview': |
|
| 450 | $bodytext = $myts->previewTarea($this->bodytext, $html, $smiley, $xcodes); |
|
| 451 | break; |
|
| 452 | case 'InForm': |
|
| 453 | $bodytext = htmlspecialchars($myts->stripSlashesGPC($this->bodytext), ENT_QUOTES); |
|
| 454 | break; |
|
| 455 | } |
|
| 456 | ||
| 457 | return $bodytext; |
|
| 458 | } |
|
| 459 | ||
| 460 | public function counter() |
|
| 461 | { |
|