Make possible to process tags inside comments

1 view
Skip to first unread message

Alexander Obuhovich

unread,
Nov 30, 2009, 4:22:07 AM11/30/09
to In-Portal Development
Currently <inp2: tags inside HTML comment tags are not processed, but there are cases, like:

<!--[if IE 6]><script type="text/javascript" src="<inp2:m_TemplatesBase/>/js/min-max.js"></script><![endif]-->

when they should work. Currently we have tag <inp2:m_Comment>...</inp2:m_Comment> that doesn't show it's contents after parsing. It's pretty useless since we can write comments in form <!--## to remove ##--> that will do the same without additional tags. I propose we make <inp2:m_Comment> tag create areas in template where <inp2: tags inside comments could be parsed (it will change NParser->InsideComment mark and then restore it's back at the end). Resulting code will be:

<inp2:m_Comment><!--[if IE 6]><script type="text/javascript" src="<inp2:m_TemplatesBase/>/js/min-max.js"></script><![endif]--></inp2:m_Comment>

We could also rename this tag to make sure it's named by the action it does.

--
Best Regards,

http://www.in-portal.org
http://www.alex-time.com

Dmitry

unread,
Nov 30, 2009, 11:23:00 AM11/30/09
to in-por...@googlegroups.com
Yes, I agree we should definitely make this change since I had a hard time and had to hack the Parser to get around this.

So are we agreeing on having <inp2:m_Comment></inp2:m_Comment> to work as:


<inp2:m_Comment><!--[if IE 6]><script type="text/javascript" src="<inp2:m_TemplatesBase/>/js/min-max.js"></script><![endif]--></inp2:m_Comment>


Let me know and we should create a task for this - fix is quick so can be included in recent development.


Cheers!


-- 


--
Best Regards,

Dmitry V. Andrejev
--

You received this message because you are subscribed to the Google Groups "In-Portal Development" group.
To post to this group, send email to in-por...@googlegroups.com.
To unsubscribe from this group, send email to in-portal-de...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/in-portal-dev?hl=en.

Alexander Obuhovich

unread,
Nov 30, 2009, 4:00:34 PM11/30/09
to in-por...@googlegroups.com
We should create a task and I will attach a patch as soon as I will implement what I've proposed earlier.

Alexander Obuhovich

unread,
Dec 1, 2009, 4:49:31 AM12/1/09
to in-por...@googlegroups.com
Here is the patch.

On Mon, Nov 30, 2009 at 6:23 PM, Dmitry <dand...@gmail.com> wrote:
tags_inside_comments.patch

Dmitry A.

unread,
Dec 4, 2009, 2:06:54 PM12/4/09
to In-Portal Development
New task has been created and patch uploaded for testing:

436: Changing behaviour of "m_Comments" tag to better support internal
comments

http://tracker.in-portal.org/view.php?id=436



Cheers!

DA.

On Dec 1, 3:49 am, Alexander Obuhovich <aik.b...@gmail.com> wrote:
> Here is the patch.
>
>
>
> On Mon, Nov 30, 2009 at 6:23 PM, Dmitry <dandre...@gmail.com> wrote:
> > Yes, I agree we should definitely make this change since I had a hard time
> > and had to hack the Parser to get around this.
>
> > So are we agreeing on having <inp2:m_Comment></inp2:m_Comment> to work as:
>
> > <inp2:m_Comment><!--[if IE 6]><script type="text/javascript"
> > src="<inp2:m_TemplatesBase/>/js/min-max.js"></script><![endif]--></inp2:m_Comment>
>
> > Let me know and we should create a task for this - fix is quick so can be
> > included in recent development.
>
> > Cheers!
>
> > --
>
> > --
> > Best Regards,
>
> > Dmitry V. Andrejev
>
> > -----Original Message-----
> > *From*: Alexander Obuhovich <aik.b...@gmail.com<Alexander%20Obuhovich%20%3caik.b...@gmail.com%3e>
>
> > *Reply-To*: in-por...@googlegroups.com
> > *To*: In-Portal Development <in-por...@googlegroups.com<In-Portal%20Development%20%3cin-po...@googlegroups.com%3e>
>
> > *Subject*: Make possible to process tags inside comments
> > *Date*: Mon, 30 Nov 2009 11:22:07 +0200
>
> > Currently <inp2: tags inside HTML comment tags are not processed, but there
> > are cases, like:
>
> > <!--[if IE 6]><script type="text/javascript"
> > src="<inp2:m_TemplatesBase/>/js/min-max.js"></script><![endif]-->
>
> > when they should work. Currently we have tag
> > <inp2:m_Comment>...</inp2:m_Comment> that doesn't show it's contents after
> > parsing. It's pretty useless since we can write comments in form <!--## to
> > remove ##--> that will do the same without additional tags. I propose we
> > make <inp2:m_Comment> tag create areas in template where <inp2: tags inside
> > comments could be parsed (it will change NParser->InsideComment mark and
> > then restore it's back at the end). Resulting code will be:
>
> > <inp2:m_Comment><!--[if IE 6]><script type="text/javascript"
> > src="<inp2:m_TemplatesBase/>/js/min-max.js"></script><![endif]--></inp2:m_Comment>
>
> > We could also rename this tag to make sure it's named by the action it
> > does.
>
> > --
> > Best Regards,
>
> >http://www.in-portal.org
> >http://www.alex-time.com
>
> > --
>
> > You received this message because you are subscribed to the Google Groups
> > "In-Portal Development" group.
> > To post to this group, send email to in-por...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > in-portal-de...@googlegroups.com<in-portal-dev%2Bunsu...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/in-portal-dev?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "In-Portal Development" group.
> > To post to this group, send email to in-por...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > in-portal-de...@googlegroups.com<in-portal-dev%2Bunsu...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/in-portal-dev?hl=en.
>
> --
> Best Regards,
>
> http://www.in-portal.orghttp://www.alex-time.com
>
> tags_inside_comments.patch
> 1KViewDownload
Reply all
Reply to author
Forward
0 new messages