Automatic "correction" of upper case letters --

#1 User is offline   Slinky

  • Slinky
  • Group: Member
  • Posts: 84365
  • Joined: 2002-03-22

Posted 2009-11-21 09:11

Many programming languages use upper case letters within keywords. For example, Excel VBA has a property Displayalerts in which the "a" in alerts is an upper case "A", see this screenshot:

Attached image

But when posting the word Displayalerts, this is automatically "corrected" without any warning. It even happens in text between code and /code tags:

Application.DisplayAlerts = True

This behavior is very inconvenient in a software-oriented board.

#2 User is offline   Slinky

  • Slinky
  • Group: Member
  • Posts: 84365
  • Joined: 2002-03-22

Posted 2009-11-21 09:27

It appears to be a display setting - older posts are displayed this way too, but the original text is still there. Here is a part of the search results when searching for displayalerts:

Attached image

But when I look at this post from the wwwthreads era (Word VBA Error 5479 (English/Word/2007)), I see

Attached image

As you can see, the behavior is inconsistent: the upper case N in wdalertsNone was left alone.

#3 User is offline   Leif

  • Numéro cinq
  • Group: Member
  • Posts: 13121
  • Joined: 2000-12-22

Posted 2009-11-21 10:29

View postHansV, on 21 Nov 2009 14:27, said:

As you can see, the behavior is inconsistent: the upper case N in wdalertsNone was left alone.


Maybe it is just the word 'alert'?

Attached image

becomes

alert alert alert alert

#4 User is offline   Slinky

  • Slinky
  • Group: Member
  • Posts: 84365
  • Joined: 2002-03-22

Posted 2009-11-21 10:37

I think you're correct - in the recent thread Switching off Access warning messages, SetWarnings (the Access equivalent of Excel's DisplayAlerts) is left untouched.
An unintended "AutoCorrect" feature?



#5 User is offline   Leif

  • Numéro cinq
  • Group: Member
  • Posts: 13121
  • Joined: 2000-12-22

Posted 2009-11-21 10:50

View postHansV, on 21 Nov 2009 15:37, said:

An unintended "AutoCorrect" feature?


Looks like it!

But we're not the first to notice:

Attached image


(but I can't access the link...)

#6 User is offline   Slinky

  • Slinky
  • Group: Member
  • Posts: 84365
  • Joined: 2002-03-22

Posted 2009-11-21 10:56

You can view the cached version, but that doesn't help much - there are no replies.

#7 User is offline   Leif

  • Numéro cinq
  • Group: Member
  • Posts: 13121
  • Joined: 2000-12-22

Posted 2009-11-21 11:11

View postLeif, on 21 Nov 2009 15:50, said:

(but I can't access the link...)


Well, the reason I can't access it is because it has been deleted. But...

Quote

This is Google's cache of http://community.inv...ew__getnewpost. It is a snapshot of the page as it appeared on 18 Nov 2009 04:55:11 GMT:


Attached image

...so posted at around 04:39 GMT three days ago.

****

(Just see Hans' reply.) Yes - there are no other posts in their Test forum older than 3 days.
A quick search didn't pull up anything reported anywhere, so perhaps they're discussing it in some hidden forum, if such things exist...?
:evilgrin:

#8 User is offline   jscher2000

  • LoungeFan
  • Group: Moderator
  • Posts: 21331
  • Joined: 2001-02-08
  • Location:Silicon Valley, California, USA

Posted 2009-11-21 12:14

You are both more Alert than I am this morning. :lol:

(Inserting empty [b][/b] tags into the word blocks the substitution, but this is not a practical workaround.)

#9 User is offline   Kurt Naber

  • Registered Lounger
  • Group: Member
  • Posts: 6
  • Joined: 2009-11-06
  • Location:Seattle, Washington, USA

Posted 2009-11-21 20:05

It appears that on retrieving the term "alert" it is being encoded as #097;lert so that the AJAX/JSON parser does not find it to be keyword requiring action. Since "alert" is a reserved word as an intrinsic function for ECMA script compatible languages running in web browsers(Javascript/JScript). It appears that the original parser's author either wasn't aware or didn't consider that sometimes people may want to use this in capitol form. A encoded as #097; should be used instead, and the case of "lert" should not be altered in the processing of input.

This reply is to document this issue, and propose a solution that should be encoded as soon as is practical.

This post has been edited by Kurt Naber: 2009-11-21 20:33


#10 User is offline   Brian Livingston

  • 4-Star Lounger (over 400 posts)
  • Group: Member
  • Posts: 461
  • Joined: 2008-12-19
  • Location:Seattle, Washington, USA

Posted 2010-01-12 03:31

Something deep in the code of our software platform, Invision Power Board 3.0, is changing the first letter of the word alert in text and URLs so the word is always spelled lowercase, not with an initial cap. This is apparently an Invision developer's attempt to prevent code from being executed by text in a post.

If you need to enter the word alert as capitalized, as in wdAlertsNone, members can use the following admittedly inconvenient workarounds. To edit posts in which the lack of capitalization causes a coding problem, any Admin or Mod can use these tricks to correct the spelling:

1. In text. To display the word alert with an initial capital letter in text, change the a to & # 6 5 ; (without the spaces).

2. In a URL. To capitalize the string alert in a URL, change the a to % 4 1 (without the spaces).

The text method uses an HTML numeric entity for A. The URL method encodes the letter A in hex. The case often doesn't matter in a URL, but some Web servers are case-sensitive.

If you edit a post using one of these workarounds, and you then save the post, the correct text and URL will result. If you edit the post a second time, you need to enter the text workaround (but not the URL workaround) once again before saving.

I had thought that this bug would be fixed by a patch in IP.Board by now, but apparently not. I hope we do get a patch to put the problem to rest soon.

This post has been edited by Brian Livingston: 2010-01-13 19:10
Reason for edit: to add workaround examples


#11 User is offline   jscher2000

  • LoungeFan
  • Group: Moderator
  • Posts: 21331
  • Joined: 2001-02-08
  • Location:Silicon Valley, California, USA

Posted 2010-04-01 15:28

View postBrian Livingston, on 2010-01-12 01:31, said:

I had thought that this bug would be fixed by a patch in IP.Board by now, but apparently not. I hope we do get a patch to put the problem to rest soon.

Hmmm, still not fixed. :(:

(Used a capital S in the middle of Javascript in post#833306 but no dice.)


1 reading this thread
0 members, 1 guests, 0 anonymous