It is quite difficult to get the following string to display, at least on FF2/Win:

&​#039;test&​#039;

If you naively write &​#039;test&​#039;, you'll get 'test', which is correct.

If you write &​amp;#039;test&​amp;#039;, you'll get 'test' as well...
(don't use copy&paste, write it yourself!!!)

The behavior is different if you try it within <code>:

If you naively write &&#x200b;#039;test&&#x200b;#039;, you'll still get &#039;test&#039;

But if you write &&#x200b;amp;#039;test&&#x200b;amp;#039;, you'll get &amp;#039;test&amp;#039; !
(again don't use copy&paste, write it yourself!!!)

Both outside and inside <code>, Project just doesn't want to render the character sequence
& # 0 3 9 ;
(without the spaces)! I'm not sure whether my browser is part of the problem or not, so I'm attaching a screenshot of my preview display.

If you want to have some fun, you can try copy&paste, and you may find that it magically works
:-)

With IE6/Win you'll see that I've used some magic characters (showing up as unprintable boxes) to force Project into showing the strings which I claim can't be shown.

CommentFileSizeAuthor
numeric-entities-IE6.png28.56 KBsalvis
numeric-entities.png27.19 KBsalvis

Comments

dww’s picture

Status: Active » Postponed (maintainer needs more info)

I don't understand why this has anything to do with the project.module. Can you please clarify? Sounds more like an issue for core at first glance...

salvis’s picture

You've got a point. The reason why I came to project.module is that this started out as a problem I had inside <code> in an issue queue, and that's where it really bothers me. AFAIK the filter that processes <code> and <?php> here on d.o not in core.

When I wrote my post, I started experimenting and found out that the opposite effect was happening in plain text. I've just verified that the core Filtered HTML input filter does the same thing to plain text, but it treats <code> in the same way as plain text.

So, I guess it would be desirable to fix the plain text issue in core, but it's much more important to fix the <code> issue in project.module, because it gets into the way when trying to post code or error messages with numeric entities.

salvis’s picture

Status: Postponed (maintainer needs more info) » Active

BTW, <?php> behaves the same as <code>.

dww’s picture

Project: Project » Code Filter
Component: Miscellaneous » Code

<code> is from the Code Filter module. Moving to the right queue.

salvis’s picture

Thanks, I didn't realize this was a separate module.

cameron tod’s picture

Status: Active » Closed (won't fix)

Closing this 6 year old issue on an unsupported branch. However, it seems like this issue got resolved at some point, and the string renders fine in 7.x and 6.x. See for yourself:

&#039;test&#039;

'test'

:)

salvis’s picture

Agreed, thanks.