1
0
mirror of https://github.com/shuchkin/simplexlsxgen.git synced 2023-08-10 21:12:59 +03:00
This commit is contained in:
Sergey Shuchkin 2021-06-22 00:57:29 +06:00
parent f970452779
commit dcb5f8ad65
2 changed files with 5 additions and 1 deletions

View File

@ -1,5 +1,9 @@
# Changelog # Changelog
## 1.0.15 (2021-06-22)
* Fixed *mailto* hyperlinks detection
## 1.0.14 (2021-06-08) ## 1.0.14 (2021-06-08)
* Added *mailto* hyperlinks support (thx Howard Martin) * Added *mailto* hyperlinks support (thx Howard Martin)

View File

@ -504,7 +504,7 @@ class SimpleXLSXGen {
$h = explode( '#', $v ); $h = explode( '#', $v );
$this->sheets[ $idx ]['hyperlinks'][] = ['ID' => 'rId' . ( count( $this->sheets[ $idx ]['hyperlinks'] ) + 1 ), 'R' => $cname, 'H' => $h[0], 'L' => isset( $h[1] ) ? $h[1] : '']; $this->sheets[ $idx ]['hyperlinks'][] = ['ID' => 'rId' . ( count( $this->sheets[ $idx ]['hyperlinks'] ) + 1 ), 'R' => $cname, 'H' => $h[0], 'L' => isset( $h[1] ) ? $h[1] : ''];
$F = self::F_HYPERLINK; // Hyperlink $F = self::F_HYPERLINK; // Hyperlink
} elseif ( preg_match( "/([a-zA-Z0-9_\.\-]+)@([a-zA-Z0-9\-]+)\.([a-zA-Z0-9\-\.]*)/i", $v ) ) { } elseif ( preg_match( "/^([a-zA-Z0-9_\.\-]+)@([a-zA-Z0-9\-]+)\.([a-zA-Z0-9\-\.]*)$/i", $v ) ) {
$this->sheets[ $idx ]['hyperlinks'][] = ['ID' => 'rId' . ( count( $this->sheets[ $idx ]['hyperlinks'] ) + 1 ), 'R' => $cname, 'H' => 'mailto:' . $v, 'L' => '']; $this->sheets[ $idx ]['hyperlinks'][] = ['ID' => 'rId' . ( count( $this->sheets[ $idx ]['hyperlinks'] ) + 1 ), 'R' => $cname, 'H' => 'mailto:' . $v, 'L' => ''];
$F = self::F_HYPERLINK; // Hyperlink $F = self::F_HYPERLINK; // Hyperlink
} }