Skip to content

Commit 5ad24b1

Browse files
committed
Allow for newline entity in MXP sequence
1 parent cba48ce commit 5ad24b1

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

mxp/mxpEntities.cpp

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,12 @@ void CMUSHclientDoc::MXP_collected_entity (void)
4747
CString strEntityContents = MXP_GetEntity (m_strMXPstring);
4848

4949
if (!strEntityContents.IsEmpty ())
50-
AddToLine (strEntityContents, 0);
50+
{
51+
// if the entity happens to be < & > etc. don't reprocess it
52+
m_bMXP = false;
53+
DisplayMsg (strEntityContents, strEntityContents.GetLength (), 0);
54+
m_bMXP = true;
55+
}
5156

5257
} // end of CMUSHclientDoc::MXP_collected_entity
5358

@@ -109,7 +114,7 @@ CString strEntityContents;
109114
iResult *= 10;
110115
iResult += strName [i] - '0';
111116
}
112-
if (iResult != 9 && iResult != 10 ) // we will accept tabs and newlines ;)
117+
if (iResult != 9 && iResult != 10 && iResult != 13 ) // we will accept tabs, newlines and carriage-returns ;)
113118
if (iResult < 32 || // don't allow nonprintable characters
114119
iResult > 255) // don't allow characters more than 1 byte
115120
{

mxp/mxp_phases.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ void CMUSHclientDoc::Phase_MXP_ENTITY (const unsigned char c)
8282
switch (c)
8383
{
8484
case ';':
85-
MXP_collected_entity (); // we have an entity now
8685
m_phase = NONE;
86+
MXP_collected_entity (); // we have an entity now
8787
break;
8888

8989
// shouldn't have a & inside a &

0 commit comments

Comments
 (0)