summaryrefslogtreecommitdiff
path: root/includes/classes/class_note.php
diff options
context:
space:
mode:
authorfisharebest <fisharebest@gmail.com>2010-10-30 11:06:15 +0000
committerfisharebest <fisharebest@gmail.com>2010-10-30 11:06:15 +0000
commit3170e659dc1f3be4e87c8cbf4d4c74b321b6f5eb (patch)
tree0d0c86a7df2af32f923f875c981937116898a042 /includes/classes/class_note.php
parentbb9380f78cc1136cca02e80e13a1e4f976f846fa (diff)
downloadwebtrees-3170e659dc1f3be4e87c8cbf4d4c74b321b6f5eb.tar.gz
webtrees-3170e659dc1f3be4e87c8cbf4d4c74b321b6f5eb.tar.bz2
webtrees-3170e659dc1f3be4e87c8cbf4d4c74b321b6f5eb.zip
#663955. Be explicit about which sorts of URL to generate: '&amp;' for ones in html, and '&' for ones in HTTP headers and between WT_JS_START/WT_JS_END markers. Get rid of "encode_url()" function, which attempted to "magically" fix problems with the wrong URL style.
Diffstat (limited to 'includes/classes/class_note.php')
-rw-r--r--includes/classes/class_note.php11
1 files changed, 7 insertions, 4 deletions
diff --git a/includes/classes/class_note.php b/includes/classes/class_note.php
index 14ea2c9791..19bece1771 100644
--- a/includes/classes/class_note.php
+++ b/includes/classes/class_note.php
@@ -37,9 +37,13 @@ define('WT_CLASS_NOTE_PHP', '');
require_once WT_ROOT.'includes/classes/class_gedcomrecord.php';
class Note extends GedcomRecord {
- // Generate a URL that links to this record
- public function getLinkUrl() {
- return parent::_getLinkUrl('note.php?nid=');
+ // Generate a URL to this record, suitable for use in HTML
+ public function getHtmlUrl() {
+ return parent::_getLinkUrl('note.php?nid=', '&amp;');
+ }
+ // Generate a URL to this record, suitable for use in javascript, HTTP headers, etc.
+ public function getRawUrl() {
+ return parent::_getLinkUrl('note.php?nid=', '&');
}
// The 'name' of a note record is the first line. This can be
@@ -59,4 +63,3 @@ class Note extends GedcomRecord {
return parent::_getAllNames('NOTE', '0 @'.WT_REGEX_XREF.'@');
}
}
-?>