Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Making Jade work for the White House
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Jed Wood  
View profile  
 More options Oct 16 2012, 5:44 pm
From: Jed Wood <jed.w...@gravitytank.com>
Date: Tue, 16 Oct 2012 17:44:32 -0400
Local: Tues, Oct 16 2012 5:44 pm
Subject: Making Jade work for the White House

TJ and Jade Friends-

I'll start with the punchline.

*How can I best let PHP tags pass through Jade untouched?*
*
*
This:
form#new-vendor-form(action="<?php echo route('vendors') ?>", method="POST")

and this:
form#new-vendor-form(action="\<?php echo route('vendors') ?\>",
method="POST")

But both result in:
<form id="new-vendor-form" action="&lt;?php echo route('vendors') ?&gt;"
method="POST">

Could it be as simple as making this line:
https://github.com/visionmedia/jade/blob/master/lib/compiler.js#L652
only escape html tags that don't have the ? before/after them?

Read on for some context.

I'm working on a cool
project<http://www.whitehouse.gov/innovationfellows/rfpez>under the
White House CTO that's trying to make it easier for the U.S.
government to acquire technology from startups and small tech companies.
Unfortunately, we're bound to using PHP for the core of the app. But we're
trying to make that as painless as possible. We've got stylus working, and
we're using a good framework called Laravel <http://laravel.com>. We put a
lot of effort into getting this PHP port of
jade<https://github.com/dz0ny/jade.php>integrated and it works okay,
but we're running into too many little
annoying issues and we'd rather stick with proper Jade if possible.

TJ, hopefully you can help your friends south of the border! :)

Thanks,

jed wood


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
vision media [ Tj Holowaychuk ]  
View profile  
 More options Oct 17 2012, 10:56 am
From: "vision media [ Tj Holowaychuk ]" <t...@vision-media.ca>
Date: Wed, 17 Oct 2012 07:56:05 -0700
Local: Wed, Oct 17 2012 10:56 am
Subject: Re: Making Jade work for the White House

hey! sounds cool :) there is an (ugly) unescaped attribute syntax the same
as regular unescaped buffering:

foo(something!='<val>')

<foo something="<val>">

it's somewhat ugly by-design so it stands out as insecure for user input,
we could add additional logic for strings with no js expressions and leave
those unescaped but that's not something I've had time to look at, or much
of a need personally so it's been really low priority


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jed Wood  
View profile  
 More options Oct 17 2012, 10:44 pm
From: Jed Wood <jed.w...@gravitytank.com>
Date: Wed, 17 Oct 2012 19:44:09 -0700 (PDT)
Local: Wed, Oct 17 2012 10:44 pm
Subject: Re: Making Jade work for the White House

Thanks TJ. We might give that a shot. Understandable that you wouldn't want
to put effort into supporting an edge use case like this.

Cheers,
-Jed

On Wednesday, October 17, 2012 10:56:07 AM UTC-4, vision media [ Tj


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »