Welcome to Geeklog Sunday, July 12 2020 @ 03:53 am EDT

Geeklog Forums

Using the { symbol in templates


Status: offline

LWC

Forum User
Full Member
Registered: 19/02/04
Posts: 818
I know it's possible by using a space, like { this}, but what if I use a reg exp command in Javascript that can't handle the space?
Is there another way to make sure Geeklog won't steal the { for itself?
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 12/01/02
Posts: 13073
Location:Stuttgart, Germany
Try writing them as HTML character references (aka entities). 123 is { and 125 is }

And now let's see if the forum will let me post them ...
PHP Formatted Code
{ }
 

bye, Dirk
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 12/01/02
Posts: 13073
Location:Stuttgart, Germany
Bah, of course not ... So let's try it with spaces:
PHP Formatted Code
& #123; & #125;
 

bye, Dirk
 Quote

Status: offline

LWC

Forum User
Full Member
Registered: 19/02/04
Posts: 818
Like I said, it's for a Javascript command involving reg exp. It has to have the real { and }.
 Quote

Status: offline

LWC

Forum User
Full Member
Registered: 19/02/04
Posts: 818
So is there anything I can do (again, reg exp can't use Ascii substitues).
 Quote

Status: offline

ronack

Forum User
Full Member
Registered: 27/05/03
Posts: 612
Can you add a slash like /{ or /}
 Quote

Status: offline

LWC

Forum User
Full Member
Registered: 19/02/04
Posts: 818
Not only that I don't think Geeklog cares, but it ruins the reg exp anyway.
 Quote

All times are EDT. The time is now 03:53 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content