question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

MXP not escaping single quote character when generating link.

See original GitHub issue

Brief summary of issue / Description of requested feature:

The single quote can’t be escaped, and isn’t automatically escaped when included as part of a MXP response. Trying to substitute ' yields ' as it escapes the & character instead.

Steps to reproduce the issue / Reasons for adding feature:

  1. say |lc' Aye!|lt|gAll in favor?|n|le
  2. say |lcget lady's coin purse|lt|gpick up the item that the merchant dropped|n|le
  3. Notice no effect when clicking on links with MXP-enabled client or webclient

Error output / Expected result of feature

You say, "<SEND HREF='' Aye!'>All in favor?</SEND>" You say, "<SEND HREF='get lady's coin purse'>pick up the item that the merchant dropped</SEND>"

Expected escape of single quote as an HTML entity when within single quotes or use of double quotes when no double quote exists in the HREF:

You say, "<SEND HREF='&#39; Aye!'>All in favor?</SEND>" You say, "<SEND HREF='get lady&#39;s coin purse'>pick up the item that the merchant dropped</SEND>"

or

You say, "<SEND HREF="' Aye!">All in favor?</SEND>" You say, "<SEND HREF="get lady's coin purse">pick up the item that the merchant dropped</SEND>"

Extra information, such as Evennia revision/repo/branch, operating system and ideas for how to solve / implement:

current

The raw links are visible by forcing @option mxp=on in a non-MXP client.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
Griatchcommented, Nov 6, 2016

My bad, the environment wasn’t as clean as I thought it was. Running with a clean game dir and applying the \\&quote; in the replacement seems to have resolved the issue so that

say |lcsay Able to process a quote character: (")|ltClick on this!|le 

(and other combinations of " or ’ in the cmd) now appears to work. I have not tested with the RPsystem though.

0reactions
BlauFeuercommented, Nov 6, 2016

I was probably having the same problem with a test environment. Anyway, I can close this now! I tested on 4 different game folders, one of them a vanilla+RP system, another a vanilla, and two different game folders in various levels of development, one of them on a different computer. Now, the MXP link does nothing if you do escape the double quote. We’ll just call that “expected behavior” and leave it at that.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to escape single quotes within single quoted strings
There is no way to escape single quotes or anything else within single quotes. The following is, perhaps surprisingly, a complete command: $...
Read more >
Escape Single quote from string - Power Platform Community
Hi All, I am creating folders in SharePoint using ms flows. it works perfectly when "Output" does not have "single quote" in.
Read more >
How to Escape Single Quotes in SQL - Database Star
When you are working with text values in SQL, you use single quote characters. This could be when you're selecting them: SELECT 'Database...
Read more >
Escaping single quote character breaks String.format ...
This is caused by the backslash escaping the single quote by the t character. My work around it to do this: String.format('Dear {0},...
Read more >
"Unexpected character ', while reading `payload` as Json ...
In the case that you have double quotes as part of a value (that is enclosed with double quotes) then you would need...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found