fixed waypoint-description line-break display in cache listing
... and trimmed trailing cr/lf to avoid surprises on v3.0.5 update
This commit is contained in:
@@ -44,7 +44,7 @@ function getWaypoints($cacheid)
|
||||
$tmpline = mb_ereg_replace('{wp_type}', htmlspecialchars($waypoint['name'], ENT_COMPAT, 'UTF-8'), $tmpline);
|
||||
$htmlcoordinate = $formatter->formatHtml($waypoint['coordinate'], '</td></tr><tr><td style="white-space:nowrap">');
|
||||
$tmpline = mb_ereg_replace('{wp_coordinate}', $htmlcoordinate, $tmpline);
|
||||
$tmpline = mb_ereg_replace('{wp_description}', htmlspecialchars($waypoint['description'], ENT_COMPAT, 'UTF-8'), $tmpline);
|
||||
$tmpline = mb_ereg_replace('{wp_description}', htmlspecialchars(trim($waypoint['description']), ENT_COMPAT, 'UTF-8'), $tmpline);
|
||||
$tmpline = mb_ereg_replace('{wp_show_description}', mb_ereg_replace('\r\n','<br />',htmlspecialchars($waypoint['description'], ENT_COMPAT, 'UTF-8')), $tmpline);
|
||||
$tmpline = mb_ereg_replace('{cacheid}', htmlspecialchars($cacheid, ENT_COMPAT, 'UTF-8'), $tmpline);
|
||||
$tmpline = mb_ereg_replace('{childid}', htmlspecialchars($waypoint['childid'], ENT_COMPAT, 'UTF-8'), $tmpline);
|
||||
|
@@ -348,7 +348,7 @@ function output_cachexml($sWaypoint)
|
||||
echo 'imagewidth="38" imageheight="38" ';
|
||||
echo 'latitude="' . xmlentities($waypoint['latitude']) . '" ';
|
||||
echo 'longitude="' . xmlentities($waypoint['longitude']) . '" ';
|
||||
echo 'description="' . xmlentities(mb_ereg_replace('\r\n','<br />',htmlentities($waypoint['description'],ENT_NOQUOTES,'UTF-8'))) . '" />\n';
|
||||
echo 'description="' . xmlentities(mb_ereg_replace('\r\n','<br />',htmlentities(trim($waypoint['description']),ENT_NOQUOTES,'UTF-8'))) . '" />\n';
|
||||
}
|
||||
|
||||
echo ' </cache>\n';
|
||||
|
@@ -332,7 +332,7 @@
|
||||
<tr bgcolor="{cycle values="#ffffff,#eeeeee"}">
|
||||
<td width="25%"><table cellspacing="0" cellpadding="0"><tr><td><img src="{$childWaypoint.image}" /></td><td>{$childWaypoint.name|escape}</td></tr></table></td>
|
||||
<td width="18%">{$childWaypoint.coordinateHtml}</td>
|
||||
<td>{$childWaypoint.description|escape}</td>
|
||||
<td>{$childWaypoint.description|escape|replace:"\r\n":"<br />"}</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
|
@@ -30,6 +30,7 @@ function getChildWaypoints($cacheid)
|
||||
for ($i = 0; $i < $count; $i++)
|
||||
{
|
||||
$waypoints[$i]['coordinateHtml'] = $formatter->formatHtml($waypoints[$i]['coordinate'], '<br />');
|
||||
$waypoints[$i]['description'] = trim($waypoints[$i]['description']);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user