Skip to content

Commit 191ad25

Browse files
committed
Use word-break: break-all in guilds description + character comment
1 parent 7469be6 commit 191ad25

6 files changed

+8
-8
lines changed

system/pages/characters.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -400,7 +400,7 @@ function retrieve_former_name($name)
400400
'rank' => isset($guild_name) ? $rank_of_player->getName() : null,
401401
'link' => isset($guild_name) ? getGuildLink($guild_name) : null
402402
),
403-
'comment' => !empty($comment) ? wordwrap(nl2br($comment), 60, "<br/>", true) : null,
403+
'comment' => !empty($comment) ? nl2br($comment) : null,
404404
'skills' => isset($skills) ? $skills : null,
405405
'quests_enabled' => $quests_enabled,
406406
'quests' => isset($quests) ? $quests : null,

system/pages/guilds/list_of_guilds.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
$description = $guild->getCustomField('description');
2626
$description_with_lines = str_replace(array("\r\n", "\n", "\r"), '<br />', $description, $count);
2727
if ($count < $config['guild_description_lines_limit'])
28-
$description = wordwrap(nl2br($description), 60, "<br />", true);
28+
$description = nl2br($description);
2929

3030
$guildName = $guild->getName();
3131
$guilds[] = array('name' => $guildName, 'logo' => $guild_logo, 'link' => getGuildLink($guildName, false), 'description' => $description);
@@ -36,4 +36,4 @@
3636
'guilds' => $guilds,
3737
'logged' => isset($logged) ? $logged : false,
3838
'isAdmin' => admin(),
39-
));
39+
));

system/pages/guilds/show.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
$description = $guild->getCustomField('description');
8484
$description_with_lines = str_replace(array("\r\n", "\n", "\r"), '<br />', $description, $count);
8585
if($count < $config['guild_description_lines_limit'])
86-
$description = wordwrap(nl2br($description), 60, "<br />", true);
86+
$description = nl2br($description);
8787
//$description = $description_with_lines;
8888

8989
$guild_owner = $guild->getOwner();
@@ -159,4 +159,4 @@
159159
'invited_list' => $invited_list,
160160
'show_accept_invite' => $show_accept_invite,
161161
'useGuildNick' => $useGuildNick
162-
));
162+
));

system/templates/characters.html.twig

+1-1
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@
142142
{% set rows = rows + 1 %}
143143
<tr bgcolor="{{ getStyle(rows) }}">
144144
<td valign="top">Comment:</td>
145-
<td>{{ comment|raw }}</td>
145+
<td style="word-break: break-all">{{ comment|raw }}</td>
146146
</tr>
147147
{% endif %}
148148

system/templates/guilds.list.html.twig

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
<img src="images/guilds/{{ guild.logo }}" width="64" height="64">
4545
</td>
4646

47-
<td>
47+
<td style="word-break: break-all">
4848
<span{% if guild.description is not empty %} valign="top"{% endif %}>
4949
<b>{{ guild.name }}</b>{% if isAdmin %}<a href="?subtopic=guilds&action=delete_by_admin&guild={{ guild.name }}"> - Delete this guild (for ADMIN only!)</a>{% endif %}
5050
</span>

system/templates/guilds.view.html.twig

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
<table style="width:100%;">
4848
<tbody>
4949
<tr>
50-
<td>
50+
<td style="word-break: break-all">
5151
<div id="GuildInformationContainer">
5252
{% if description is not empty %}
5353
{{ description|raw }}

0 commit comments

Comments
 (0)