diff options
| -rw-r--r-- | includes/functions/functions_print_facts.php | 3 | ||||
| -rw-r--r-- | library/WT/Event.php | 8 |
2 files changed, 9 insertions, 2 deletions
diff --git a/includes/functions/functions_print_facts.php b/includes/functions/functions_print_facts.php index fc23caa5a1..1c169251cd 100644 --- a/includes/functions/functions_print_facts.php +++ b/includes/functions/functions_print_facts.php @@ -258,6 +258,9 @@ function print_fact(WT_Event $eventObj) { case 'WWW': echo '<div class="field"><a href="', htmlspecialchars($eventObj->getDetail()), '">', htmlspecialchars($eventObj->getDetail()), '</a></div>'; break; + case 'TEXT': // 0 SOUR / 1 TEXT + echo '<div class="field">', nl2br(htmlspecialchars($eventObj->getDetail())), '</div>'; + break; default: // Display the value for all other facts/events switch ($eventObj->getDetail()) { diff --git a/library/WT/Event.php b/library/WT/Event.php index f1269e90fd..5aad497c73 100644 --- a/library/WT/Event.php +++ b/library/WT/Event.php @@ -21,7 +21,7 @@ // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// @version $Id$ +// $Id$ if (!defined('WT_WEBTREES')) { header('HTTP/1.0 403 Forbidden'); @@ -84,9 +84,13 @@ class WT_Event { // the line number (from the original, privacy-filtered) gedcom // record, to allow editing function __construct($subrecord, $parent, $lineNumber) { - if (preg_match('/^1 ('.WT_REGEX_TAG.') ?(.*)/', $subrecord, $match)) { + if (preg_match('/^1 ('.WT_REGEX_TAG.') ?(.*)((\n2 CONT .*)*)/', $subrecord, $match)) { $this->tag =$match[1]; $this->detail=$match[2]; + // Some detail records contain multiple lines + if ($match[3]) { + $this->detail.=str_replace("\n2 CONT ", "\n", $match[3]); + } } else { // We are not ready for this yet. // throw new Exception('Invalid GEDCOM data passed to WT_Event::_construct('.$subrecord.')'); |
