Skip to content

Commit

Permalink
Allow for newline entity in MXP sequence
Browse files Browse the repository at this point in the history
  • Loading branch information
nickgammon committed Feb 12, 2015
1 parent cba48ce commit 5ad24b1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions mxp/mxpEntities.cpp
Expand Up @@ -47,7 +47,12 @@ void CMUSHclientDoc::MXP_collected_entity (void)
CString strEntityContents = MXP_GetEntity (m_strMXPstring);

if (!strEntityContents.IsEmpty ())
AddToLine (strEntityContents, 0);
{
// if the entity happens to be < & > etc. don't reprocess it
m_bMXP = false;
DisplayMsg (strEntityContents, strEntityContents.GetLength (), 0);
m_bMXP = true;
}

} // end of CMUSHclientDoc::MXP_collected_entity

Expand Down Expand Up @@ -109,7 +114,7 @@ CString strEntityContents;
iResult *= 10;
iResult += strName [i] - '0';
}
if (iResult != 9 && iResult != 10 ) // we will accept tabs and newlines ;)
if (iResult != 9 && iResult != 10 && iResult != 13 ) // we will accept tabs, newlines and carriage-returns ;)
if (iResult < 32 || // don't allow nonprintable characters
iResult > 255) // don't allow characters more than 1 byte
{
Expand Down
2 changes: 1 addition & 1 deletion mxp/mxp_phases.cpp
Expand Up @@ -82,8 +82,8 @@ void CMUSHclientDoc::Phase_MXP_ENTITY (const unsigned char c)
switch (c)
{
case ';':
MXP_collected_entity (); // we have an entity now
m_phase = NONE;
MXP_collected_entity (); // we have an entity now
break;

// shouldn't have a & inside a &
Expand Down

0 comments on commit 5ad24b1

Please sign in to comment.