fix: Cleans up FixHtml (#1757)
This commit is contained in:
parent
af67c48621
commit
becd7aad05
19 changed files with 69 additions and 63 deletions
|
|
@ -44,8 +44,8 @@ namespace Server.Items
|
|||
var title = reader.ReadAsciiSafe(60);
|
||||
var author = reader.ReadAsciiSafe(30);
|
||||
|
||||
book.Title = Utility.FixHtml(title);
|
||||
book.Author = Utility.FixHtml(author);
|
||||
book.Title = title.FixHtml();
|
||||
book.Author = author.FixHtml();
|
||||
}
|
||||
|
||||
public static void HeaderChange(NetState state, SpanReader reader)
|
||||
|
|
@ -80,8 +80,8 @@ namespace Server.Items
|
|||
|
||||
var author = reader.ReadUTF8Safe(authorLength);
|
||||
|
||||
book.Title = Utility.FixHtml(title);
|
||||
book.Author = Utility.FixHtml(author);
|
||||
book.Title = title.FixHtml();
|
||||
book.Author = author.FixHtml();
|
||||
}
|
||||
|
||||
public static void ContentChange(NetState state, SpanReader reader)
|
||||
|
|
|
|||
|
|
@ -114,11 +114,11 @@ public partial class Guildstone : Item, IAddon, IChoppable
|
|||
}
|
||||
|
||||
// list.Add( 1060802, Utility.FixHtml( name ) ); // Guild name: ~1_val~
|
||||
list.Add(1060802, $"{Utility.FixHtmlFormattable(name)} [{Utility.FixHtmlFormattable(abbr)}]");
|
||||
list.Add(1060802, $"{name.FixHtmlFormattable()} [{abbr.FixHtmlFormattable()}]");
|
||||
}
|
||||
else if (_guildName != null && _guildAbbrev != null)
|
||||
{
|
||||
list.Add(1060802, $"{Utility.FixHtmlFormattable(_guildName)} [{Utility.FixHtmlFormattable(_guildAbbrev)}]");
|
||||
list.Add(1060802, $"{_guildName.FixHtmlFormattable()} [{_guildAbbrev.FixHtmlFormattable()}]");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -254,11 +254,11 @@ public partial class GuildstoneDeed : Item
|
|||
}
|
||||
|
||||
// list.Add( 1060802, Utility.FixHtml( name ) ); // Guild name: ~1_val~
|
||||
list.Add(1060802, $"{Utility.FixHtmlFormattable(name)} [{Utility.FixHtmlFormattable(abbr)}]");
|
||||
list.Add(1060802, $"{name.FixHtmlFormattable()} [{abbr.FixHtmlFormattable()}]");
|
||||
}
|
||||
else if (_guildName != null && _guildAbbrev != null)
|
||||
{
|
||||
list.Add(1060802, $"{Utility.FixHtmlFormattable(_guildName)} [{Utility.FixHtmlFormattable(_guildAbbrev)}]");
|
||||
list.Add(1060802, $"{_guildName.FixHtmlFormattable()} [{_guildAbbrev.FixHtmlFormattable()}]");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -234,7 +234,7 @@ public partial class Key : Item
|
|||
return;
|
||||
}
|
||||
|
||||
_key.Description = Utility.FixHtml(text);
|
||||
_key.Description = text.FixHtml();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -245,7 +245,7 @@ public partial class WeaponEngravingTool : Item, IUsesRemaining, IRewardItem
|
|||
else
|
||||
{
|
||||
_target.EngravedText =
|
||||
Utility.FixHtml(relay.Length > 64 ? relay[..64] : relay);
|
||||
(relay.Length > 64 ? relay[..64] : relay).FixHtml();
|
||||
state.Mobile.SendLocalizedMessage(1072361); // You engraved the object.
|
||||
_target.InvalidateProperties();
|
||||
_tool.UsesRemaining -= 1;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue