Skip to content

Commit

Permalink
Table drive some wide_to_html
Browse files Browse the repository at this point in the history
  • Loading branch information
nigelhorne committed Oct 27, 2024
1 parent 2bd3416 commit aab2fca
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions gedcom
Original file line number Diff line number Diff line change
Expand Up @@ -11335,6 +11335,7 @@ sub get_all_residences
# Add valid Gedcom::Record residences to the results array
push @rc, $residence if $residence->isa('Gedcom::Record');
}

my @events = $person->event();
$index = 0;
foreach my $event(@events) {
Expand All @@ -11353,6 +11354,7 @@ sub get_all_residences
push @rc, $event;
}
}

my @censuses = $person->census();
$index = 0;
foreach my $census(@censuses) {
Expand Down Expand Up @@ -13406,11 +13408,21 @@ sub wide_to_html
$string =~ s/&/&/g;

unless($params->{'keep_hrefs'}) {
$string =~ s/</&lt;/g;
$string =~ s/>/&gt;/g;
$string =~ s/"/&quot;/g;
$string =~ s//&quot;/g; # U+201C
$string =~ s//&quot;/g; # U+201D
# $string =~ s/</&lt;/g;
# $string =~ s/>/&gt;/g;
# $string =~ s/"/&quot;/g;
# $string =~ s/“/&quot;/g; # U+201C
# $string =~ s/”/&quot;/g; # U+201D

my %replacements = (
'<' => '&lt;',
'>' => '&gt;',
'"' => '&quot;',
'' => '&quot;', # U+201C
'' => '&quot;', # U+201D
);

$string =~ s/([<>“”"])/$replacements{$1}/g;
}

# $string =~ s/&db=/&amp;db=/g;
Expand Down

0 comments on commit aab2fca

Please sign in to comment.