Jump to content

Non-breaking space ( ) code appearing in macro edit


Ridiculous Girl

Recommended Posts

in a totally unrelated bug report i mentioned that i have occasionally had &nbsp being inserted in my macros while i am editting, after someone else mentioned it. @srmalloy mentioned that it was a HMTL code and it should not be appearing. well, i finally was fooling around with some macros again, trying things out and i got it again. it happens when i am editing directly in the editor, but i am not sure if it is because i am pasting in some text from a text document or if it is because i am doing multiple revsions of the same macro in the editor. i'll try some more, to recreate this when i have more time

 

On 8/30/2024 at 12:17 AM, srmalloy said:

'&nbs' is the HTML 'non-breaking space' entity (so if you had a string 'mad&nbslad', you would always see 'mad lad' on one line in a web page, never splitting 'mad' and 'lad' across two lines); the game should not be inserting HTML entities into your macros.

 

image.png.d19149918d220ee9bdb6867323943380.png

 

please ignore all the limitless radial freeeem because i was just messing around... 😄

Edited by Ridiculous Girl
changed title subject to better reflect the bug, and fixed typos

"I'm not crazy, my reality is just different than yours" the Cheshire Cat

"Ce n'est rien de mourir; c'est affreux de ne pas vivre"

(It's nothing to die, it's terrible not to live) Jean Valjean

"وطن المرء ليس مكان ولادته و لكنه المكان الذي تنتهي فيه كل محاولاته للهروب”

(Home is not where you were born, home is where all your attempts to escape cease.) Naguib Mahfouz

Link to comment
Share on other sites

well that was easy to reproduce...

 

i made the macro, did some edits, tested it, did some more, tested some more, it failed when it should have worked and when i looked at it, the hidden script was there in the text. but if i copy the text out of the macro editor, it does not appear when i paste it in a text editor, like here "powexeclocation target faux grant"... the only way to fix it is to paste the text back in. then the macro works as expected. (or fail since faux grant does not do anything... 😉 )

 

image.png.7b0624c1998f1cdcce42b38b9517f386.png

"I'm not crazy, my reality is just different than yours" the Cheshire Cat

"Ce n'est rien de mourir; c'est affreux de ne pas vivre"

(It's nothing to die, it's terrible not to live) Jean Valjean

"وطن المرء ليس مكان ولادته و لكنه المكان الذي تنتهي فيه كل محاولاته للهروب”

(Home is not where you were born, home is where all your attempts to escape cease.) Naguib Mahfouz

Link to comment
Share on other sites

  • Ridiculous Girl changed the title to Non-breaking space ( ) code apearing in macro edit

OMG i changed the title and put the code in the title and it is functioning as a non-breaking space! OOPS! 🤪

"I'm not crazy, my reality is just different than yours" the Cheshire Cat

"Ce n'est rien de mourir; c'est affreux de ne pas vivre"

(It's nothing to die, it's terrible not to live) Jean Valjean

"وطن المرء ليس مكان ولادته و لكنه المكان الذي تنتهي فيه كل محاولاته للهروب”

(Home is not where you were born, home is where all your attempts to escape cease.) Naguib Mahfouz

Link to comment
Share on other sites

  • Ridiculous Girl changed the title to Non-breaking space ( ) code appearing in macro edit
1 hour ago, Ridiculous Girl said:

i have occasionally had &nbsp being inserted in my macros while i am editting, after someone else mentioned it. @srmalloy mentioned that it was a HMTL code and it should not be appearing.

It can also happen if you copy a macro. For instance, several of my characters have lots of different appearances. They typically use the same costume change emote for each one though, so after making the 1st costume change macro, I will copy the text in the macro to paste in the rest to save myself time. Only to have the new macros not work. And when I check the failed macros text, their text has changed to HTML code. It does not happen often, but on any character that it happens on, it happens for all the macros. (The weird part is that typically if I go back to the original macro and re-copy the text into the duplicate macros? It fixes the other macros most of the time for some reason. Otherwise I have to delete that macro because it refuses to change the displayed HTML code to regular text no matter what I do, and then just make a new macro where I just type in the text.)

  • Thumbs Up 1
Link to comment
Share on other sites

This is one reason I always encourage using a VERY basic text editor (Ex: Notepad) when dealing with anything that's sensitive to possible hidden characters as you never know when it'll sparce something you don't know is there.

  • Banjo 1
  • Pizza (Pepperoni) 1

OG Server: Pinnacle  <||>  Current Primary Server: Torchbearer  ||  Also found on the others if desired  <||> Generally Inactive


Installing CoX:  Windows  ||  MacOS  ||  MacOS for M1  <||>  Migrating Data from an Older Installation


Clubs: Mid's Hero Designer  ||  PC Builders  ||  HC Wiki  ||  Jerk Hackers


Old Forums  <||>  Titan Network  <||>  Heroica! (by @Shenanigunner)

 

Link to comment
Share on other sites

  • 2 weeks later

This happens to me as well with NO external editor involved.  Sometimes the game just wants to pretend there's a NPSP.  The only way is to re-edit the macro and delete and re-type all the spaces.

 

P. S. If you type &nbsp; into chat to explain this to someone, you get a non-breaking space, not the string "&nbsp;"  The HTML parser this game uses is bat-shit.

 

  • Haha 1
Link to comment
Share on other sites

37 minutes ago, gameboy1234 said:

 The HTML parser this game uses is bat-shit.

 

It kills me because the text editor and html parser have been batshit since day 1, despite there being GOOD public domain and BSD-licensed text editors and parsers available... like: https://www.scintilla.org/

 

The only reason I can imagine that we're STILL stuck with it is that it's the base of a house of cards at this point.

 

I remember very clearly when clickable links first went in. In the beta, players figured out toute suite that they could link to things not meant to be linked to and were able to do things like link NPC portraits and power icons in chat.

 

An example of current editor braindeadness:

 

I've got a popmenu item that starts chat with the text to rebind F7 to actually say 'F7!!' instead of 'Ready!!', but doesn't finish it in case I want to edit it further: Option "F7" "beginchat /bind f7 say <scale 1.50><color #FFFFFF><bordercolor #000000><bgcolor #00A000>F7!!"

 

When I actually use that, does it paste that exact line into the textbar so I can edit it further?

 

Abso-freakin-lutely not!

 

spacer.png

 

And this is somehow despite the fact that we don't really have any good font-size handling. Does it at least keep the color so that it's at least CONSISTENTLY applying the styling? Again, no.

 

But does the bind itself actually work despite not actually displaying all the text going into the bind? It sure does!

  • Pizza (Pepperoni) 1
Link to comment
Share on other sites

On 9/13/2024 at 1:22 PM, Rudra said:

They typically use the same costume change emote for each one though, so after making the 1st costume change macro, I will copy the text in the macro to paste in the rest to save myself time.

 

The way I do it is to create the first costume macro, go back into the chat line, arrow up, edit the macro in the chat line, and repeat as necessary.

 

Any editing on macros I do at this point are all done in the chat line and not through editing a macro.

 

I have a text file with all the standard macros I use in it ... which includes the basic costume change macro structure and a list of all the ccemotes so I just have to copy and paste whatever I need into the chat line.

 

On 9/13/2024 at 12:12 PM, Ridiculous Girl said:

&nbsp

 

I would kind of be shocked if no one reported this before. It has been going on since I started playing City of Heroes before Issue 2 was released.

 

 

 

 

  • Pizza (Pepperoni) 1

If someone posts a reply quoting me and I don't reply, they may be on ignore.

(It seems I'm involved with so much at this point that I may not be able to easily retrieve access to all the notifications)

Some players know that I have them on ignore and are likely to make posts knowing that is the case.

But the fact that I have them on ignore won't stop some of them from bullying and harassing people, because some of them love to do it. There is a group that have banded together to target forum posters they don't like. They think that this behavior is acceptable.

Ignore (in the forums) and /ignore (in-game) are tools to improve your gaming experience. Don't feel bad about using them.

Link to comment
Share on other sites

On 9/13/2024 at 9:12 AM, Ridiculous Girl said:

but i am not sure if it is because i am pasting in some text from a text document or if it is because i am doing multiple revsions of the same macro in the editor

 

If editing existing macros is the main circumstance you encounter this in, there's a behavior in the bio editor (AE too, I think) that might be related: whenever you enter two consecutive spaces, or while editing allow two existing spaces to touch, one of those spaces will automatically be made non-breaking, recorded as an &nbsp; while looking like just another space.

For example, if I want to edit the sentence "I want to edit the sentence" to say "a" sentence instead, if I place the cursor right at the end of "the" and backspace, it will eventually say "edit  sentence" with two spaces for an instant before I hit 'a'. In that instant, it's become "edit&nbsp; sentence", and will remain "edit&nbsp;a sentence" after I enter the new word. And if I typed multiple words, each time I hit space from that position with a space following, the same thing would happen, leading to invisible character-count-devouring chains like "edit&nbsp;some&nbsp;other sentence".

 

If this is what's happening, it can be avoided by always starting any edits with the cursor at the start of the next word you intend to keep, and might be fixable by just backspacing the affected space so the words on either side touch then re-entering a single space.

  • Pizza (Pepperoni) 1
Link to comment
Share on other sites

6 hours ago, UltraAlt said:

I would kind of be shocked if no one reported this before. It has been going on since I started playing City of Heroes before Issue 2 was released.

i would be too, but i did search the forums to make sure i was not repeating. but i doubt it was unknown. just one of those things that needed to be reported so if anyone else encounters it in whatever situation, can add instances. like someone just added the problem with the bio editor, which has forever been driving me nuts! 😄

  • Thanks 1

"I'm not crazy, my reality is just different than yours" the Cheshire Cat

"Ce n'est rien de mourir; c'est affreux de ne pas vivre"

(It's nothing to die, it's terrible not to live) Jean Valjean

"وطن المرء ليس مكان ولادته و لكنه المكان الذي تنتهي فيه كل محاولاته للهروب”

(Home is not where you were born, home is where all your attempts to escape cease.) Naguib Mahfouz

Link to comment
Share on other sites

57 minutes ago, AlwaysAPrice said:

whenever you enter two consecutive spaces

ah, now that is interesting! 🙂

 

58 minutes ago, AlwaysAPrice said:

bio editor (AE too, I think)

the biography editor adding hidden text drives me mad! but that double space is news to me. i will keep that in mind the next time i edit there. 🙂

 

i reported on another bug thread about the AE editor multiplying the symbol %, essentially doubling itself with every save, which leads to comic results after multiple saves... 😄

"I'm not crazy, my reality is just different than yours" the Cheshire Cat

"Ce n'est rien de mourir; c'est affreux de ne pas vivre"

(It's nothing to die, it's terrible not to live) Jean Valjean

"وطن المرء ليس مكان ولادته و لكنه المكان الذي تنتهي فيه كل محاولاته للهروب”

(Home is not where you were born, home is where all your attempts to escape cease.) Naguib Mahfouz

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...