Welcome to Geeklog, Anonymous Saturday, December 21 2024 @ 11:52 am EST

Geeklog Forums

Using the { symbol in templates


Status: offline

LWC

Forum User
Full Member
Registered: 02/19/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: 01/12/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 ...
Text Formatted Code
{ }
 

bye, Dirk
 Quote

Status: offline

Dirk

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

bye, Dirk
 Quote

Status: offline

LWC

Forum User
Full Member
Registered: 02/19/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: 02/19/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: 05/27/03
Posts: 612
Can you add a slash like /{ or /}
 Quote

Status: offline

LWC

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

All times are EST. The time is now 11:52 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