Quantcast

FORMFIELD strips out ! chars from data field.

classic Classic list List threaded Threaded
17 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

FORMFIELD strips out ! chars from data field.

Raymond Lutz
This is a bit of a change from prior versions.
I have a form field which is map embed html code, such as

<iframe
src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d2754.237574894085!2d-117.14718681754962!3d32.73070126356125!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x80d95496fecba979%3A0xed6a3c55e20692df!2sBea+Evenson+Fountain!5e1!3m2!1sen!2sus!4v1431899238739"
width="600" height="450" frameborder="0" style="border:0"></iframe>

Please note the ! chars in the google operands. The data field in the
actual topic item is correct, and the map displays correctly in the FORM
at the bottom of the topic. But when I use

%FORMFIELD{"Map Embed"}%

in the page, the ! chars are stripped out (from "view source"):

<iframe
src="https://www.google.com/maps/embed?pb=1m181m121m31d2754.2375748940852d-117.147186817549623d32.730701263561252m31f02f03f03m21i10242i7684f13.13m31m21s0x80d95496fecba979%3A0xed6a3c55e20692df2sBea+Evenson+Fountain5e13m21sen2sus4v1431899396999"
width="600" height="450" frameborder="0" style="border:0"></iframe>

And this displays a generic map of the world because the operands are
invalid.
I tried it with <noautolink>, <literal>, <pre>, and combinations
thereof, with no result.

Gee it seems I have wrestled with this issue before but I can't remember
if it was resolved or not.

Here is a topic with all the various options tested.
http://www.copswiki.org/Common/TestVenue

Help anyone?
--Ray Lutz






------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Foswiki-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/foswiki-discuss
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FORMFIELD strips out ! chars from data field.

George Clark-2
In order to enter an exclamation mark, you can either enter the entity. &#33; or escape it with <nop>!

This is documented in EditingShorthand in the upcoming 1.2 .. not sure where it is in 1.1.9

George


On May 17, 2015 7:14:39 PM EDT, Ray Lutz <[hidden email]> wrote:
>This is a bit of a change from prior versions.
>I have a form field which is map embed html code, such as
>
><iframe
>src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d2754.237574894085!2d-117.14718681754962!3d32.73070126356125!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x80d95496fecba979%3A0xed6a3c55e20692df!2sBea+Evenson+Fountain!5e1!3m2!1sen!2sus!4v1431899238739";
>
>width="600" height="450" frameborder="0" style="border:0"></iframe>
>
>Please note the ! chars in the google operands. The data field in the
>actual topic item is correct, and the map displays correctly in the
>FORM
>at the bottom of the topic. But when I use
>
>%FORMFIELD{"Map Embed"}%
>
>in the page, the ! chars are stripped out (from "view source"):
>
><iframe
>src="https://www.google.com/maps/embed?pb=1m181m121m31d2754.2375748940852d-117.147186817549623d32.730701263561252m31f02f03f03m21i10242i7684f13.13m31m21s0x80d95496fecba979%3A0xed6a3c55e20692df2sBea+Evenson+Fountain5e13m21sen2sus4v1431899396999";
>
>width="600" height="450" frameborder="0" style="border:0"></iframe>
>
>And this displays a generic map of the world because the operands are
>invalid.
>I tried it with <noautolink>, <literal>, <pre>, and combinations
>thereof, with no result.
>
>Gee it seems I have wrestled with this issue before but I can't
>remember
>if it was resolved or not.
>
>Here is a topic with all the various options tested.
>http://www.copswiki.org/Common/TestVenue
>
>Help anyone?
>--Ray Lutz
>
>
>
>
>
>
>------------------------------------------------------------------------------
>One dashboard for servers and applications across
>Physical-Virtual-Cloud
>Widest out-of-the-box monitoring support with 50+ applications
>Performance metrics, stats and reports that give you Actionable
>Insights
>Deep dive visibility with transaction tracing using APM Insight.
>http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
>_______________________________________________
>Foswiki-discuss mailing list
>[hidden email]
>https://lists.sourceforge.net/lists/listinfo/foswiki-discuss

--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.
------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Foswiki-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/foswiki-discuss
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FORMFIELD strips out ! chars from data field.

Raymond Lutz
My current workaround is to edit the google url and replace ! with %21. No, &#33; and <nop>! does not work because this is not HTML, it is URL syntax. But at other times it would work.
But the point is that I DO NOT want to have to edit google links just so I can refer to it on the page using FORMFIELD. This used to work in 1.04, so I am not sure how this new "feature" crept in.
<literal> should work to disable this substitution. Also, it seems like <noautolink> should also disable the search for ! in the process of autolinking.
right now, there is no way to get an arbitrary FORMFIELD with embedded !'s to appear in the page.

Thus, Test!Sentence!with!embedded!exclamation!points! becomes TestSentencewithembeddedexclamationpoints!
and there is no way to disable the substitution except to pre-edit the entry and substitute each and every ! with &#33; or %21 as applicable. It is really not feasible to ask users to replace ! in arbitrary google map links with %21 because there are about 20 of them in every link, plus any editing is really a non-starter.

Should I report this as a bug?

--Ray

On 2015-05-17 4:36 PM, George Clark wrote:
In order to enter an exclamation mark, you can either enter the entity. &#33; or escape it with <nop>!

This is documented in EditingShorthand in the upcoming 1.2 .. not sure where it is in 1.1.9

George


On May 17, 2015 7:14:39 PM EDT, Ray Lutz [hidden email] wrote:
>This is a bit of a change from prior versions.
>I have a form field which is map embed html code, such as
>
><iframe
>src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d2754.237574894085!2d-117.14718681754962!3d32.73070126356125!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x80d95496fecba979%3A0xed6a3c55e20692df!2sBea+Evenson+Fountain!5e1!3m2!1sen!2sus!4v1431899238739";
>
>width="600" height="450" frameborder="0" style="border:0"></iframe>
>
>Please note the ! chars in the google operands. The data field in the
>actual topic item is correct, and the map displays correctly in the
>FORM
>at the bottom of the topic. But when I use
>
>%FORMFIELD{"Map Embed"}%
>
>in the page, the ! chars are stripped out (from "view source"):
>
><iframe
>src="https://www.google.com/maps/embed?pb=1m181m121m31d2754.2375748940852d-117.147186817549623d32.730701263561252m31f02f03f03m21i10242i7684f13.13m31m21s0x80d95496fecba979%3A0xed6a3c55e20692df2sBea+Evenson+Fountain5e13m21sen2sus4v1431899396999";
>
>width="600" height="450" frameborder="0" style="border:0"></iframe>
>
>And this displays a generic map of the world because the operands are
>invalid.
>I tried it with <noautolink>, <literal>, <pre>, and combinations
>thereof, with no result.
>
>Gee it seems I have wrestled with this issue before but I can't
>remember
>if it was resolved or not.
>
>Here is a topic with all the various options tested.
>http://www.copswiki.org/Common/TestVenue
>
>Help anyone?
>--Ray Lutz
>
>
>
>
>
>
>------------------------------------------------------------------------------
>One dashboard for servers and applications across
>Physical-Virtual-Cloud
>Widest out-of-the-box monitoring support with 50+ applications
>Performance metrics, stats and reports that give you Actionable
>Insights
>Deep dive visibility with transaction tracing using APM Insight.
>http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
>_______________________________________________
>Foswiki-discuss mailing list
>[hidden email]
>https://lists.sourceforge.net/lists/listinfo/foswiki-discuss

--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y


_______________________________________________
Foswiki-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/foswiki-discuss


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Foswiki-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/foswiki-discuss
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FORMFIELD strips out ! chars from data field.

George Clark-2
Yes, please open a task and we'll look at it.

George

On May 17, 2015 9:23:25 PM EDT, Ray Lutz <[hidden email]> wrote:
My current workaround is to edit the google url and replace ! with %21. No, &#33; and <nop>! does not work because this is not HTML, it is URL syntax. But at other times it would work.
But the point is that I DO NOT want to have to edit google links just so I can refer to it on the page using FORMFIELD. This used to work in 1.04, so I am not sure how this new "feature" crept in.
<literal> should work to disable this substitution. Also, it seems like <noautolink> should also disable the search for ! in the process of autolinking.
right now, there is no way to get an arbitrary FORMFIELD with embedded !'s to appear in the page.

Thus, Test!Sentence!with!embedded!exclamation!points! becomes TestSentencewithembeddedexclamationpoints!
and there is no way to disable the substitution except to pre-edit the entry and substitute each and every ! with &#33; or %21 as applicable. It is really not feasible to ask users to replace ! in arbitrary google map links with %21 because there are about 20 of them in every link, plus any editing is really a non-starter.

Should I report this as a bug?

--Ray

On 2015-05-17 4:36 PM, George Clark wrote:
In order to enter an exclamation mark, you can either enter the entity. &#33; or escape it with <nop>!

This is documented in EditingShorthand in the upcoming 1.2 .. not sure where it is in 1.1.9

George


On May 17, 2015 7:14:39 PM EDT, Ray Lutz [hidden email] wrote:
>This is a bit of a change from prior versions.
>I have a form field which is map embed html code, such as
>
><iframe
>src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d2754.237574894085!2d-117.14718681754962!3d32.73070126356125!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x80d95496fecba979%3A0xed6a3c55e20692df!2sBea+Evenson+Fountain!5e1!3m2!1sen!2sus!4v1431899238739";
>
>width="600" height="450" frameborder="0" style="border:0"></iframe>
>
>Please note the ! chars in the google operands. The data field in the
>actual topic item is correct, and the map displays correctly in the
>FORM
>at the bottom of the topic. But when I use
>
>%FORMFIELD{"Map Embed"}%
>
>in the page, the ! chars are stripped out (from "view source"):
>
><iframe
>src="https://www.google.com/maps/embed?pb=1m181m121m31d2754.2375748940852d-117.147186817549623d32.730701263561252m31f02f03f03m21i10242i7684f13.13m31m21s0x80d95496fecba979%3A0xed6a3c55e20692df2sBea+Evenson+Fountain5e13m21sen2sus4v1431899396999";
>
>width="600" height="450" frameborder="0" style="border:0"></iframe>
>
>And this displays a generic map of the world because the operands are
>invalid.
>I tried it with <noautolink>, <literal>, <pre>, and combinations
>thereof, with no result.
>
>Gee it seems I have wrestled with this issue before but I can't
>remember
>if it was resolved or not.
>
>Here is a topic with all the various options tested.
>http://www.copswiki.org/Common/TestVenue
>
>Help anyone?
>--Ray Lutz
>
>
>
>
>
>
>------------------------------------------------------------------------------
>One dashboard for servers and applications across
>Physical-Virtual-Cloud
>Widest out-of-the-box monitoring support with 50+ applications
>Performance metrics, stats and reports that give you Actionable
>Insights
>Deep dive visibility with transaction tracing using APM Insight.
>http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
>_______________________________________________
>Foswiki-discuss mailing list
>[hidden email]
>https://lists.sourceforge.net/lists/listinfo/foswiki-discuss

--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y


_______________________________________________
Foswiki-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/foswiki-discuss



One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y



Foswiki-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/foswiki-discuss

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Foswiki-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/foswiki-discuss
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FORMFIELD strips out ! chars from data field.

Chris Hoefler
In reply to this post by Raymond Lutz
You should be able to use ENCODE to do what you require.

%ENCODE{"%FORMFIELD{"MapField"}%" type="url"}%



On May 17, 2015, at 8:23 PM, Ray Lutz <[hidden email]> wrote:

My current workaround is to edit the google url and replace ! with %21. No, &#33; and <nop>! does not work because this is not HTML, it is URL syntax. But at other times it would work.
But the point is that I DO NOT want to have to edit google links just so I can refer to it on the page using FORMFIELD. This used to work in 1.04, so I am not sure how this new "feature" crept in.
<literal> should work to disable this substitution. Also, it seems like <noautolink> should also disable the search for ! in the process of autolinking.
right now, there is no way to get an arbitrary FORMFIELD with embedded !'s to appear in the page.

Thus, Test!Sentence!with!embedded!exclamation!points! becomes TestSentencewithembeddedexclamationpoints!
and there is no way to disable the substitution except to pre-edit the entry and substitute each and every ! with &#33; or %21 as applicable. It is really not feasible to ask users to replace ! in arbitrary google map links with %21 because there are about 20 of them in every link, plus any editing is really a non-starter.

Should I report this as a bug?

--Ray

On 2015-05-17 4:36 PM, George Clark wrote:
In order to enter an exclamation mark, you can either enter the entity. &#33; or escape it with <nop>!

This is documented in EditingShorthand in the upcoming 1.2 .. not sure where it is in 1.1.9

George


On May 17, 2015 7:14:39 PM EDT, Ray Lutz [hidden email] wrote:
>This is a bit of a change from prior versions.
>I have a form field which is map embed html code, such as
>
><iframe
>src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d2754.237574894085!2d-117.14718681754962!3d32.73070126356125!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x80d95496fecba979%3A0xed6a3c55e20692df!2sBea+Evenson+Fountain!5e1!3m2!1sen!2sus!4v1431899238739";
>
>width="600" height="450" frameborder="0" style="border:0"></iframe>
>
>Please note the ! chars in the google operands. The data field in the
>actual topic item is correct, and the map displays correctly in the
>FORM
>at the bottom of the topic. But when I use
>
>%FORMFIELD{"Map Embed"}%
>
>in the page, the ! chars are stripped out (from "view source"):
>
><iframe
>src="https://www.google.com/maps/embed?pb=1m181m121m31d2754.2375748940852d-117.147186817549623d32.730701263561252m31f02f03f03m21i10242i7684f13.13m31m21s0x80d95496fecba979%3A0xed6a3c55e20692df2sBea+Evenson+Fountain5e13m21sen2sus4v1431899396999";
>
>width="600" height="450" frameborder="0" style="border:0"></iframe>
>
>And this displays a generic map of the world because the operands are
>invalid.
>I tried it with <noautolink>, <literal>, <pre>, and combinations
>thereof, with no result.
>
>Gee it seems I have wrestled with this issue before but I can't
>remember
>if it was resolved or not.
>
>Here is a topic with all the various options tested.
>http://www.copswiki.org/Common/TestVenue
>
>Help anyone?
>--Ray Lutz
>
>
>
>
>
>
>------------------------------------------------------------------------------
>One dashboard for servers and applications across
>Physical-Virtual-Cloud
>Widest out-of-the-box monitoring support with 50+ applications
>Performance metrics, stats and reports that give you Actionable
>Insights
>Deep dive visibility with transaction tracing using APM Insight.
>http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
>_______________________________________________
>Foswiki-discuss mailing list
>[hidden email]
>https://lists.sourceforge.net/lists/listinfo/foswiki-discuss

--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y


_______________________________________________
Foswiki-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/foswiki-discuss

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Foswiki-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/foswiki-discuss

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Foswiki-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/foswiki-discuss
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FORMFIELD strips out ! chars from data field.

George Clark-2
In reply to this post by Raymond Lutz
Hi Ray,

It appears that this "just works" on Foswiki 1.2,  I'm not sure what's
changed, but your example works fine.
See http://trunk.foswiki.org/Sandbox/TestGoogleIframe

Use your foswiki.org login for trunk access.

George

On 05/17/2015 07:14 PM, Ray Lutz wrote:

> This is a bit of a change from prior versions.
> I have a form field which is map embed html code, such as
>
> <iframe
> src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d2754.237574894085!2d-117.14718681754962!3d32.73070126356125!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x80d95496fecba979%3A0xed6a3c55e20692df!2sBea+Evenson+Fountain!5e1!3m2!1sen!2sus!4v1431899238739"
> width="600" height="450" frameborder="0" style="border:0"></iframe>
>
> Please note the ! chars in the google operands. The data field in the
> actual topic item is correct, and the map displays correctly in the FORM
> at the bottom of the topic. But when I use
>
> %FORMFIELD{"Map Embed"}%
>
> in the page, the ! chars are stripped out (from "view source"):
>
> <iframe
> src="https://www.google.com/maps/embed?pb=1m181m121m31d2754.2375748940852d-117.147186817549623d32.730701263561252m31f02f03f03m21i10242i7684f13.13m31m21s0x80d95496fecba979%3A0xed6a3c55e20692df2sBea+Evenson+Fountain5e13m21sen2sus4v1431899396999"
> width="600" height="450" frameborder="0" style="border:0"></iframe>
>
> And this displays a generic map of the world because the operands are
> invalid.
> I tried it with <noautolink>, <literal>, <pre>, and combinations
> thereof, with no result.
>
> Gee it seems I have wrestled with this issue before but I can't remember
> if it was resolved or not.
>
> Here is a topic with all the various options tested.
> http://www.copswiki.org/Common/TestVenue
>
> Help anyone?
> --Ray Lutz
>
>
>
>
>
>
> ------------------------------------------------------------------------------
> One dashboard for servers and applications across Physical-Virtual-Cloud
> Widest out-of-the-box monitoring support with 50+ applications
> Performance metrics, stats and reports that give you Actionable Insights
> Deep dive visibility with transaction tracing using APM Insight.
> http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
> _______________________________________________
> Foswiki-discuss mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/foswiki-discuss


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Foswiki-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/foswiki-discuss
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FORMFIELD strips out ! chars from data field.

Raymond Lutz
Hi George:
Yes, I agree that works to paste in the URL directly into the topic.
The problem occurs when the string is accessed from a FORMFIELD.
I edited that topic by adding a form, inserting the string into the field, and indeed it fails.

But now I can't even edit the topic as it goes to some other page that is like this:

---------
TestEdit-- CrawfordCurrie - 31 Jul 2012

--------

Take a look.
--Ray

On 2015-05-17 7:34 PM, George Clark wrote:
Hi Ray,

It appears that this "just works" on Foswiki 1.2,  I'm not sure what's
changed, but your example works fine. 
See http://trunk.foswiki.org/Sandbox/TestGoogleIframe

Use your foswiki.org login for trunk access.

George

On 05/17/2015 07:14 PM, Ray Lutz wrote:
This is a bit of a change from prior versions.
I have a form field which is map embed html code, such as

<iframe 
src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d2754.237574894085!2d-117.14718681754962!3d32.73070126356125!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x80d95496fecba979%3A0xed6a3c55e20692df!2sBea+Evenson+Fountain!5e1!3m2!1sen!2sus!4v1431899238739" 
width="600" height="450" frameborder="0" style="border:0"></iframe>

Please note the ! chars in the google operands. The data field in the 
actual topic item is correct, and the map displays correctly in the FORM 
at the bottom of the topic. But when I use

%FORMFIELD{"Map Embed"}%

in the page, the ! chars are stripped out (from "view source"):

<iframe 
src="https://www.google.com/maps/embed?pb=1m181m121m31d2754.2375748940852d-117.147186817549623d32.730701263561252m31f02f03f03m21i10242i7684f13.13m31m21s0x80d95496fecba979%3A0xed6a3c55e20692df2sBea+Evenson+Fountain5e13m21sen2sus4v1431899396999" 
width="600" height="450" frameborder="0" style="border:0"></iframe>

And this displays a generic map of the world because the operands are 
invalid.
I tried it with <noautolink>, <literal>, <pre>, and combinations 
thereof, with no result.

Gee it seems I have wrestled with this issue before but I can't remember 
if it was resolved or not.

Here is a topic with all the various options tested.
http://www.copswiki.org/Common/TestVenue

Help anyone?
--Ray Lutz






------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Foswiki-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/foswiki-discuss

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Foswiki-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/foswiki-discuss



------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Foswiki-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/foswiki-discuss
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FORMFIELD strips out ! chars from data field.

Raymond Lutz
In reply to this post by Chris Hoefler
No, that does not work because the field is not a pure URL, as it is an iframe syntax directly from google maps link button. such as:

<iframe
src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d2754.237574894085!2d-117.14718681754962!3d32.73070126356125!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x80d95496fecba979%3A0xed6a3c55e20692df!2sBea+Evenson+Fountain!5e1!3m2!1sen!2sus!4v1431899238739" width="600" height="450" frameborder="0" style="border:0"></iframe>

I tried it with every possible encode type and it does not work with mixed syntax like that.

With the syntax you suggested, I get this:

%3ciframe%20src%3d%22https://www.google.com/maps/embed%3fpb%3d%3cnop%3e1m18%3cnop%3e1m12%3cnop%3e1m3%3cnop%3e1d2754.237574894085%3cnop%3e2d-117.14718681754962%3cnop%3e3d32.73070126356125%3cnop%3e2m3%3cnop%3e1f0%3cnop%3e2f0%3cnop%3e3f0%3cnop%3e3m2%3cnop%3e1i1024%3cnop%3e2i768%3cnop%3e4f13.1%3cnop%3e3m3%3cnop%3e1m2%3cnop%3e1s0x80d95496fecba979%253A0xed6a3c55e20692df%3cnop%3e2sBea%2bEvenson%2bFountain%3cnop%3e5e1%3cnop%3e3m2%3cnop%3e1sen%3cnop%3e2sus%3cnop%3e4v1431899396999

I also tried it this way:
%FORMFIELD{"Map Embed" format="$percentENCODE{"$value" type="url"}$percent"}%
Which probably should be effectively the same thing, but the result is different. To be complete, I also tried all combinations with this syntax.

%FORMFIELD{"Map Embed" format="$percentENCODE{"$value" type="url"}$percent"}%
%FORMFIELD{"Map Embed" format="%ENCODE{"$value" type="url"}%"}%
%ENCODE{"%FORMFIELD{"Map Embed"}%" type="url"}%
%ENCODE{"$percentFORMFIELD{"Map Embed"}$percent" type="url"}%
$percentENCODE{"%FORMFIELD{"Map Embed"}%" type="url"}$percent
none of these work. The tests are here:
http://www.copswiki.org/Common/TestVenue

Task started as: http://trunk.foswiki.org/Tasks/Item13407

--Ray

On 2015-05-17 7:19 PM, Chris Hoefler wrote:
You should be able to use ENCODE to do what you require.

%ENCODE{"%FORMFIELD{"MapField"}%" type="url"}%



On May 17, 2015, at 8:23 PM, Ray Lutz <[hidden email]> wrote:

My current workaround is to edit the google url and replace ! with %21. No, &#33; and <nop>! does not work because this is not HTML, it is URL syntax. But at other times it would work.
But the point is that I DO NOT want to have to edit google links just so I can refer to it on the page using FORMFIELD. This used to work in 1.04, so I am not sure how this new "feature" crept in.
<literal> should work to disable this substitution. Also, it seems like <noautolink> should also disable the search for ! in the process of autolinking.
right now, there is no way to get an arbitrary FORMFIELD with embedded !'s to appear in the page.

Thus, Test!Sentence!with!embedded!exclamation!points! becomes TestSentencewithembeddedexclamationpoints!
and there is no way to disable the substitution except to pre-edit the entry and substitute each and every ! with &#33; or %21 as applicable. It is really not feasible to ask users to replace ! in arbitrary google map links with %21 because there are about 20 of them in every link, plus any editing is really a non-starter.

Should I report this as a bug?

--Ray

On 2015-05-17 4:36 PM, George Clark wrote:
In order to enter an exclamation mark, you can either enter the entity. &#33; or escape it with <nop>!

This is documented in EditingShorthand in the upcoming 1.2 .. not sure where it is in 1.1.9

George


On May 17, 2015 7:14:39 PM EDT, Ray Lutz [hidden email] wrote:
>This is a bit of a change from prior versions.
>I have a form field which is map embed html code, such as
>
><iframe
>src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d2754.237574894085!2d-117.14718681754962!3d32.73070126356125!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x80d95496fecba979%3A0xed6a3c55e20692df!2sBea+Evenson+Fountain!5e1!3m2!1sen!2sus!4v1431899238739";
>
>width="600" height="450" frameborder="0" style="border:0"></iframe>
>
>Please note the ! chars in the google operands. The data field in the
>actual topic item is correct, and the map displays correctly in the
>FORM
>at the bottom of the topic. But when I use
>
>%FORMFIELD{"Map Embed"}%
>
>in the page, the ! chars are stripped out (from "view source"):
>
><iframe
>src="https://www.google.com/maps/embed?pb=1m181m121m31d2754.2375748940852d-117.147186817549623d32.730701263561252m31f02f03f03m21i10242i7684f13.13m31m21s0x80d95496fecba979%3A0xed6a3c55e20692df2sBea+Evenson+Fountain5e13m21sen2sus4v1431899396999";
>
>width="600" height="450" frameborder="0" style="border:0"></iframe>
>
>And this displays a generic map of the world because the operands are
>invalid.
>I tried it with <noautolink>, <literal>, <pre>, and combinations
>thereof, with no result.
>
>Gee it seems I have wrestled with this issue before but I can't
>remember
>if it was resolved or not.
>
>Here is a topic with all the various options tested.
>http://www.copswiki.org/Common/TestVenue
>
>Help anyone?
>--Ray Lutz
>
>
>
>
>
>
>------------------------------------------------------------------------------
>One dashboard for servers and applications across
>Physical-Virtual-Cloud
>Widest out-of-the-box monitoring support with 50+ applications
>Performance metrics, stats and reports that give you Actionable
>Insights
>Deep dive visibility with transaction tracing using APM Insight.
>http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
>_______________________________________________
>Foswiki-discuss mailing list
>[hidden email]
>https://lists.sourceforge.net/lists/listinfo/foswiki-discuss

--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y


_______________________________________________
Foswiki-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/foswiki-discuss

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Foswiki-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/foswiki-discuss


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y


_______________________________________________
Foswiki-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/foswiki-discuss


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Foswiki-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/foswiki-discuss
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FORMFIELD strips out ! chars from data field.

Chris Hoefler
Do you have to store the iframe tags in the formfield? If you store just the url, you can format it using something like,

<iframe src="%ENCODE{%FORMFIELD%}%></iframe>

That said, I was able to make your method work using QUERY instead of FORMFIELD,

%QUERY{"MapURL"}%

On Mon, May 18, 2015 at 12:33 AM, Ray Lutz <[hidden email]> wrote:
No, that does not work because the field is not a pure URL, as it is an iframe syntax directly from google maps link button. such as:

<iframe
src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d2754.237574894085!2d-117.14718681754962!3d32.73070126356125!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x80d95496fecba979%3A0xed6a3c55e20692df!2sBea+Evenson+Fountain!5e1!3m2!1sen!2sus!4v1431899238739" width="600" height="450" frameborder="0" style="border:0"></iframe>

I tried it with every possible encode type and it does not work with mixed syntax like that.

With the syntax you suggested, I get this:

%3ciframe%20src%3d%22https://www.google.com/maps/embed%3fpb%3d%3cnop%3e1m18%3cnop%3e1m12%3cnop%3e1m3%3cnop%3e1d2754.237574894085%3cnop%3e2d-117.14718681754962%3cnop%3e3d32.73070126356125%3cnop%3e2m3%3cnop%3e1f0%3cnop%3e2f0%3cnop%3e3f0%3cnop%3e3m2%3cnop%3e1i1024%3cnop%3e2i768%3cnop%3e4f13.1%3cnop%3e3m3%3cnop%3e1m2%3cnop%3e1s0x80d95496fecba979%253A0xed6a3c55e20692df%3cnop%3e2sBea%2bEvenson%2bFountain%3cnop%3e5e1%3cnop%3e3m2%3cnop%3e1sen%3cnop%3e2sus%3cnop%3e4v1431899396999

I also tried it this way:
%FORMFIELD{"Map Embed" format="$percentENCODE{"$value" type="url"}$percent"}%
Which probably should be effectively the same thing, but the result is different. To be complete, I also tried all combinations with this syntax.

%FORMFIELD{"Map Embed" format="$percentENCODE{"$value" type="url"}$percent"}%
%FORMFIELD{"Map Embed" format="%ENCODE{"$value" type="url"}%"}%
%ENCODE{"%FORMFIELD{"Map Embed"}%" type="url"}%
%ENCODE{"$percentFORMFIELD{"Map Embed"}$percent" type="url"}%
$percentENCODE{"%FORMFIELD{"Map Embed"}%" type="url"}$percent
none of these work. The tests are here:
http://www.copswiki.org/Common/TestVenue

Task started as: http://trunk.foswiki.org/Tasks/Item13407

--Ray


On 2015-05-17 7:19 PM, Chris Hoefler wrote:
You should be able to use ENCODE to do what you require.

%ENCODE{"%FORMFIELD{"MapField"}%" type="url"}%



On May 17, 2015, at 8:23 PM, Ray Lutz <[hidden email]> wrote:

My current workaround is to edit the google url and replace ! with %21. No, &#33; and <nop>! does not work because this is not HTML, it is URL syntax. But at other times it would work.
But the point is that I DO NOT want to have to edit google links just so I can refer to it on the page using FORMFIELD. This used to work in 1.04, so I am not sure how this new "feature" crept in.
<literal> should work to disable this substitution. Also, it seems like <noautolink> should also disable the search for ! in the process of autolinking.
right now, there is no way to get an arbitrary FORMFIELD with embedded !'s to appear in the page.

Thus, Test!Sentence!with!embedded!exclamation!points! becomes TestSentencewithembeddedexclamationpoints!
and there is no way to disable the substitution except to pre-edit the entry and substitute each and every ! with &#33; or %21 as applicable. It is really not feasible to ask users to replace ! in arbitrary google map links with %21 because there are about 20 of them in every link, plus any editing is really a non-starter.

Should I report this as a bug?

--Ray

On 2015-05-17 4:36 PM, George Clark wrote:
In order to enter an exclamation mark, you can either enter the entity. &#33; or escape it with <nop>!

This is documented in EditingShorthand in the upcoming 1.2 .. not sure where it is in 1.1.9

George


On May 17, 2015 7:14:39 PM EDT, Ray Lutz [hidden email] wrote:
>This is a bit of a change from prior versions.
>I have a form field which is map embed html code, such as
>
><iframe
>src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d2754.237574894085!2d-117.14718681754962!3d32.73070126356125!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x80d95496fecba979%3A0xed6a3c55e20692df!2sBea+Evenson+Fountain!5e1!3m2!1sen!2sus!4v1431899238739";
>
>width="600" height="450" frameborder="0" style="border:0"></iframe>
>
>Please note the ! chars in the google operands. The data field in the
>actual topic item is correct, and the map displays correctly in the
>FORM
>at the bottom of the topic. But when I use
>
>%FORMFIELD{"Map Embed"}%
>
>in the page, the ! chars are stripped out (from "view source"):
>
><iframe
>src="https://www.google.com/maps/embed?pb=1m181m121m31d2754.2375748940852d-117.147186817549623d32.730701263561252m31f02f03f03m21i10242i7684f13.13m31m21s0x80d95496fecba979%3A0xed6a3c55e20692df2sBea+Evenson+Fountain5e13m21sen2sus4v1431899396999";
>
>width="600" height="450" frameborder="0" style="border:0"></iframe>
>
>And this displays a generic map of the world because the operands are
>invalid.
>I tried it with <noautolink>, <literal>, <pre>, and combinations
>thereof, with no result.
>
>Gee it seems I have wrestled with this issue before but I can't
>remember
>if it was resolved or not.
>
>Here is a topic with all the various options tested.
>http://www.copswiki.org/Common/TestVenue
>
>Help anyone?
>--Ray Lutz
>
>
>
>
>
>
>------------------------------------------------------------------------------
>One dashboard for servers and applications across
>Physical-Virtual-Cloud
>Widest out-of-the-box monitoring support with 50+ applications
>Performance metrics, stats and reports that give you Actionable
>Insights
>Deep dive visibility with transaction tracing using APM Insight.
>http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
>_______________________________________________
>Foswiki-discuss mailing list
>[hidden email]
>https://lists.sourceforge.net/lists/listinfo/foswiki-discuss

--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y


_______________________________________________
Foswiki-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/foswiki-discuss

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Foswiki-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/foswiki-discuss


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y


_______________________________________________
Foswiki-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/foswiki-discuss


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Foswiki-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/foswiki-discuss




--
Chris Hoefler, PhD
Postdoctoral Research Associate
Straight Lab
Texas A&M University
2128 TAMU
College Station, TX 77843-2128

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Foswiki-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/foswiki-discuss
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FORMFIELD strips out ! chars from data field.

Raymond Lutz
In reply to this post by Raymond Lutz
I have a little bit more information about this. It appears to me that the stripping of '!'s occurs immediately as the field is inserted, so there is no chance any controls will have any effect.
You can test this on any topic with a form attached. (I was hoping that I could use ENCODE to replace all "!" with "%21" which should work okay in this case as there are no other !'s in the string, but it is not a general solution.)

I have this segment on my test page:
---------------
The following sentence is contained in the Phone1 FORMFIELD: <br>
Original string: Test!Sentence!with!embedded!exclamation!points! <br>
<verbatim> %FORMFIELD{"Phone1"}%</verbatim> <br>
%FORMFIELD{"Phone1"}%

<verbatim>%ENCODE{"Test!Sentence!with!embedded!exclamation!points!" old="!" new="%21"}%</verbatim> <br>
%ENCODE{"Test!Sentence!with!embedded!exclamation!points!" old="!" new="%21"}%

<verbatim>%ENCODE{"%FORMFIELD{"Phone1"}%" old="!" new="%21"}%</verbatim> <br>
%ENCODE{"%FORMFIELD{"Phone1"}%" old="!" new="%21"}%
----------------
And here is the result:
----------------
The following sentence is contained in the Phone1 FORMFIELD: 
Original string: Test!Sentence!with!embedded!exclamation!points! 
 %FORMFIELD{"Phone1"}%

TestSentencewithembeddedexclamationpoints!
%ENCODE{"Test!Sentence!with!embedded!exclamation!points!" old="!" new="%21"}%

Test%21Sentence%21with%21embedded%21exclamation%21points%21
%ENCODE{"%FORMFIELD{"Phone1"}%" old="!" new="%21"}%

TestSentencewithembeddedexclamationpoints%21

----------------
As you can see, the form field Phone1 is stripped of the embedded !'s BEFORE ENCODE has a chance to work on it.
I also tried turning that "insideout", which works the same way.

%FORMFIELD{"Phone1" format="$percentENCODE{\"$value\" old=\"!\" new=\"%21\"}$percent" }%

TestSentencewithembeddedexclamationpoints%21

This means that the !'s are stripped VERY EARLY in the process and thus there is no way to ever do anything on the page to fix it.

--------------

There is one more thing that can be tried, to place the ENCODE inside the field. Thus, I assigned Phone2 to be 
%ENCODE{"Test!Sentence!with!embedded!exclamation!points!" old="!" new="%21"}%

Envoked with: 
%FORMFIELD{"Phone2"}%

TestSentencewithembeddedexclamationpoints%21

No change, which was expected.
Thus, there is currently no way to pass embedded !'s through form fields to topics.

--Ray Lutz



On 2015-05-17 10:33 PM, Ray Lutz wrote:
No, that does not work because the field is not a pure URL, as it is an iframe syntax directly from google maps link button. such as:

<iframe
src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d2754.237574894085!2d-117.14718681754962!3d32.73070126356125!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x80d95496fecba979%3A0xed6a3c55e20692df!2sBea+Evenson+Fountain!5e1!3m2!1sen!2sus!4v1431899238739" width="600" height="450" frameborder="0" style="border:0"></iframe>

I tried it with every possible encode type and it does not work with mixed syntax like that.

With the syntax you suggested, I get this:

%3ciframe%20src%3d%22https://www.google.com/maps/embed%3fpb%3d%3cnop%3e1m18%3cnop%3e1m12%3cnop%3e1m3%3cnop%3e1d2754.237574894085%3cnop%3e2d-117.14718681754962%3cnop%3e3d32.73070126356125%3cnop%3e2m3%3cnop%3e1f0%3cnop%3e2f0%3cnop%3e3f0%3cnop%3e3m2%3cnop%3e1i1024%3cnop%3e2i768%3cnop%3e4f13.1%3cnop%3e3m3%3cnop%3e1m2%3cnop%3e1s0x80d95496fecba979%253A0xed6a3c55e20692df%3cnop%3e2sBea%2bEvenson%2bFountain%3cnop%3e5e1%3cnop%3e3m2%3cnop%3e1sen%3cnop%3e2sus%3cnop%3e4v1431899396999

I also tried it this way:
%FORMFIELD{"Map Embed" format="$percentENCODE{"$value" type="url"}$percent"}%
Which probably should be effectively the same thing, but the result is different. To be complete, I also tried all combinations with this syntax.

%FORMFIELD{"Map Embed" format="$percentENCODE{"$value" type="url"}$percent"}%
%FORMFIELD{"Map Embed" format="%ENCODE{"$value" type="url"}%"}%
%ENCODE{"%FORMFIELD{"Map Embed"}%" type="url"}%
%ENCODE{"$percentFORMFIELD{"Map Embed"}$percent" type="url"}%
$percentENCODE{"%FORMFIELD{"Map Embed"}%" type="url"}$percent
none of these work. The tests are here:
http://www.copswiki.org/Common/TestVenue

Task started as: http://trunk.foswiki.org/Tasks/Item13407

--Ray

On 2015-05-17 7:19 PM, Chris Hoefler wrote:
You should be able to use ENCODE to do what you require.

%ENCODE{"%FORMFIELD{"MapField"}%" type="url"}%



On May 17, 2015, at 8:23 PM, Ray Lutz <[hidden email]> wrote:

My current workaround is to edit the google url and replace ! with %21. No, &#33; and <nop>! does not work because this is not HTML, it is URL syntax. But at other times it would work.
But the point is that I DO NOT want to have to edit google links just so I can refer to it on the page using FORMFIELD. This used to work in 1.04, so I am not sure how this new "feature" crept in.
<literal> should work to disable this substitution. Also, it seems like <noautolink> should also disable the search for ! in the process of autolinking.
right now, there is no way to get an arbitrary FORMFIELD with embedded !'s to appear in the page.

Thus, Test!Sentence!with!embedded!exclamation!points! becomes TestSentencewithembeddedexclamationpoints!
and there is no way to disable the substitution except to pre-edit the entry and substitute each and every ! with &#33; or %21 as applicable. It is really not feasible to ask users to replace ! in arbitrary google map links with %21 because there are about 20 of them in every link, plus any editing is really a non-starter.

Should I report this as a bug?

--Ray

On 2015-05-17 4:36 PM, George Clark wrote:
In order to enter an exclamation mark, you can either enter the entity. &#33; or escape it with <nop>!

This is documented in EditingShorthand in the upcoming 1.2 .. not sure where it is in 1.1.9

George


On May 17, 2015 7:14:39 PM EDT, Ray Lutz [hidden email] wrote:
>This is a bit of a change from prior versions.
>I have a form field which is map embed html code, such as
>
><iframe
>src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d2754.237574894085!2d-117.14718681754962!3d32.73070126356125!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x80d95496fecba979%3A0xed6a3c55e20692df!2sBea+Evenson+Fountain!5e1!3m2!1sen!2sus!4v1431899238739";
>
>width="600" height="450" frameborder="0" style="border:0"></iframe>
>
>Please note the ! chars in the google operands. The data field in the
>actual topic item is correct, and the map displays correctly in the
>FORM
>at the bottom of the topic. But when I use
>
>%FORMFIELD{"Map Embed"}%
>
>in the page, the ! chars are stripped out (from "view source"):
>
><iframe
>src="https://www.google.com/maps/embed?pb=1m181m121m31d2754.2375748940852d-117.147186817549623d32.730701263561252m31f02f03f03m21i10242i7684f13.13m31m21s0x80d95496fecba979%3A0xed6a3c55e20692df2sBea+Evenson+Fountain5e13m21sen2sus4v1431899396999";
>
>width="600" height="450" frameborder="0" style="border:0"></iframe>
>
>And this displays a generic map of the world because the operands are
>invalid.
>I tried it with <noautolink>, <literal>, <pre>, and combinations
>thereof, with no result.
>
>Gee it seems I have wrestled with this issue before but I can't
>remember
>if it was resolved or not.
>
>Here is a topic with all the various options tested.
>http://www.copswiki.org/Common/TestVenue
>
>Help anyone?
>--Ray Lutz
>
>
>
>
>
>
>------------------------------------------------------------------------------
>One dashboard for servers and applications across
>Physical-Virtual-Cloud
>Widest out-of-the-box monitoring support with 50+ applications
>Performance metrics, stats and reports that give you Actionable
>Insights
>Deep dive visibility with transaction tracing using APM Insight.
>http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
>_______________________________________________
>Foswiki-discuss mailing list
>[hidden email]
>https://lists.sourceforge.net/lists/listinfo/foswiki-discuss

--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y


_______________________________________________
Foswiki-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/foswiki-discuss

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Foswiki-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/foswiki-discuss


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y


_______________________________________________
Foswiki-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/foswiki-discuss



------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y


_______________________________________________
Foswiki-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/foswiki-discuss


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Foswiki-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/foswiki-discuss
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FORMFIELD strips out ! chars from data field.

Chris Hoefler
Can you try your examples with QUERY instead of FORMFIELD?

Putting "Test!Sentence!with!embedded!exclamation!points!" into a form attached to the topic and pulling it back out with QUERY gives me this,

%QUERY{"MapURL"}%
Test!Sentence!with!embedded!exclamation!points!

And if you encode it you get this,
%ENCODE{"%QUERY{"MapURL"}%" old="!" new="%21"}%
Test%21Sentence%21with%21embedded%21exclamation%21points%21


As per the documentation, QUERY is recommended over FORMFIELD for most Data Form applications,
http://foswiki.org/System/VarQUERY



------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Foswiki-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/foswiki-discuss
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FORMFIELD strips out ! chars from data field.

Raymond Lutz
In reply to this post by Raymond Lutz
THIS SEEMS TO BE ALREADY CORRECTED IN THE TRUNK!

I was able to complete creating the test here http://trunk.foswiki.org/Sandbox/TestGoogleIframe
and it does seem to work correctly in the Trunk version although not in 1.1.9.

surrounding the %FORMFIELD{}% with <literal> tags works just fine but does not work in the 1.1.9 version I have installed at the moment.

Sorry about all this, apparently this was already brought up and solved and I didn't remember that!

--Ray Lutz

On 2015-05-18 9:01 AM, Ray Lutz wrote:
I have a little bit more information about this. It appears to me that the stripping of '!'s occurs immediately as the field is inserted, so there is no chance any controls will have any effect.
You can test this on any topic with a form attached. (I was hoping that I could use ENCODE to replace all "!" with "%21" which should work okay in this case as there are no other !'s in the string, but it is not a general solution.)

I have this segment on my test page:
---------------
The following sentence is contained in the Phone1 FORMFIELD: <br>
Original string: Test!Sentence!with!embedded!exclamation!points! <br>
<verbatim> %FORMFIELD{"Phone1"}%</verbatim> <br>
%FORMFIELD{"Phone1"}%

<verbatim>%ENCODE{"Test!Sentence!with!embedded!exclamation!points!" old="!" new="%21"}%</verbatim> <br>
%ENCODE{"Test!Sentence!with!embedded!exclamation!points!" old="!" new="%21"}%

<verbatim>%ENCODE{"%FORMFIELD{"Phone1"}%" old="!" new="%21"}%</verbatim> <br>
%ENCODE{"%FORMFIELD{"Phone1"}%" old="!" new="%21"}%
----------------
And here is the result:
----------------
The following sentence is contained in the Phone1 FORMFIELD: 
Original string: Test!Sentence!with!embedded!exclamation!points! 
 %FORMFIELD{"Phone1"}%

TestSentencewithembeddedexclamationpoints!
%ENCODE{"Test!Sentence!with!embedded!exclamation!points!" old="!" new="%21"}%

Test%21Sentence%21with%21embedded%21exclamation%21points%21
%ENCODE{"%FORMFIELD{"Phone1"}%" old="!" new="%21"}%

TestSentencewithembeddedexclamationpoints%21

----------------
As you can see, the form field Phone1 is stripped of the embedded !'s BEFORE ENCODE has a chance to work on it.
I also tried turning that "insideout", which works the same way.

%FORMFIELD{"Phone1" format="$percentENCODE{\"$value\" old=\"!\" new=\"%21\"}$percent" }%

TestSentencewithembeddedexclamationpoints%21

This means that the !'s are stripped VERY EARLY in the process and thus there is no way to ever do anything on the page to fix it.

--------------

There is one more thing that can be tried, to place the ENCODE inside the field. Thus, I assigned Phone2 to be 
%ENCODE{"Test!Sentence!with!embedded!exclamation!points!" old="!" new="%21"}%

Envoked with: 
%FORMFIELD{"Phone2"}%

TestSentencewithembeddedexclamationpoints%21

No change, which was expected.
Thus, there is currently no way to pass embedded !'s through form fields to topics.

--Ray Lutz



On 2015-05-17 10:33 PM, Ray Lutz wrote:
No, that does not work because the field is not a pure URL, as it is an iframe syntax directly from google maps link button. such as:

<iframe
src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d2754.237574894085!2d-117.14718681754962!3d32.73070126356125!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x80d95496fecba979%3A0xed6a3c55e20692df!2sBea+Evenson+Fountain!5e1!3m2!1sen!2sus!4v1431899238739" width="600" height="450" frameborder="0" style="border:0"></iframe>

I tried it with every possible encode type and it does not work with mixed syntax like that.

With the syntax you suggested, I get this:

%3ciframe%20src%3d%22https://www.google.com/maps/embed%3fpb%3d%3cnop%3e1m18%3cnop%3e1m12%3cnop%3e1m3%3cnop%3e1d2754.237574894085%3cnop%3e2d-117.14718681754962%3cnop%3e3d32.73070126356125%3cnop%3e2m3%3cnop%3e1f0%3cnop%3e2f0%3cnop%3e3f0%3cnop%3e3m2%3cnop%3e1i1024%3cnop%3e2i768%3cnop%3e4f13.1%3cnop%3e3m3%3cnop%3e1m2%3cnop%3e1s0x80d95496fecba979%253A0xed6a3c55e20692df%3cnop%3e2sBea%2bEvenson%2bFountain%3cnop%3e5e1%3cnop%3e3m2%3cnop%3e1sen%3cnop%3e2sus%3cnop%3e4v1431899396999

I also tried it this way:
%FORMFIELD{"Map Embed" format="$percentENCODE{"$value" type="url"}$percent"}%
Which probably should be effectively the same thing, but the result is different. To be complete, I also tried all combinations with this syntax.

%FORMFIELD{"Map Embed" format="$percentENCODE{"$value" type="url"}$percent"}%
%FORMFIELD{"Map Embed" format="%ENCODE{"$value" type="url"}%"}%
%ENCODE{"%FORMFIELD{"Map Embed"}%" type="url"}%
%ENCODE{"$percentFORMFIELD{"Map Embed"}$percent" type="url"}%
$percentENCODE{"%FORMFIELD{"Map Embed"}%" type="url"}$percent
none of these work. The tests are here:
http://www.copswiki.org/Common/TestVenue

Task started as: http://trunk.foswiki.org/Tasks/Item13407

--Ray

On 2015-05-17 7:19 PM, Chris Hoefler wrote:
You should be able to use ENCODE to do what you require.

%ENCODE{"%FORMFIELD{"MapField"}%" type="url"}%



On May 17, 2015, at 8:23 PM, Ray Lutz <[hidden email]> wrote:

My current workaround is to edit the google url and replace ! with %21. No, &#33; and <nop>! does not work because this is not HTML, it is URL syntax. But at other times it would work.
But the point is that I DO NOT want to have to edit google links just so I can refer to it on the page using FORMFIELD. This used to work in 1.04, so I am not sure how this new "feature" crept in.
<literal> should work to disable this substitution. Also, it seems like <noautolink> should also disable the search for ! in the process of autolinking.
right now, there is no way to get an arbitrary FORMFIELD with embedded !'s to appear in the page.

Thus, Test!Sentence!with!embedded!exclamation!points! becomes TestSentencewithembeddedexclamationpoints!
and there is no way to disable the substitution except to pre-edit the entry and substitute each and every ! with &#33; or %21 as applicable. It is really not feasible to ask users to replace ! in arbitrary google map links with %21 because there are about 20 of them in every link, plus any editing is really a non-starter.

Should I report this as a bug?

--Ray

On 2015-05-17 4:36 PM, George Clark wrote:
In order to enter an exclamation mark, you can either enter the entity. &#33; or escape it with <nop>!

This is documented in EditingShorthand in the upcoming 1.2 .. not sure where it is in 1.1.9

George


On May 17, 2015 7:14:39 PM EDT, Ray Lutz [hidden email] wrote:
>This is a bit of a change from prior versions.
>I have a form field which is map embed html code, such as
>
><iframe
>src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d2754.237574894085!2d-117.14718681754962!3d32.73070126356125!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x80d95496fecba979%3A0xed6a3c55e20692df!2sBea+Evenson+Fountain!5e1!3m2!1sen!2sus!4v1431899238739";
>
>width="600" height="450" frameborder="0" style="border:0"></iframe>
>
>Please note the ! chars in the google operands. The data field in the
>actual topic item is correct, and the map displays correctly in the
>FORM
>at the bottom of the topic. But when I use
>
>%FORMFIELD{"Map Embed"}%
>
>in the page, the ! chars are stripped out (from "view source"):
>
><iframe
>src="https://www.google.com/maps/embed?pb=1m181m121m31d2754.2375748940852d-117.147186817549623d32.730701263561252m31f02f03f03m21i10242i7684f13.13m31m21s0x80d95496fecba979%3A0xed6a3c55e20692df2sBea+Evenson+Fountain5e13m21sen2sus4v1431899396999";
>
>width="600" height="450" frameborder="0" style="border:0"></iframe>
>
>And this displays a generic map of the world because the operands are
>invalid.
>I tried it with <noautolink>, <literal>, <pre>, and combinations
>thereof, with no result.
>
>Gee it seems I have wrestled with this issue before but I can't
>remember
>if it was resolved or not.
>
>Here is a topic with all the various options tested.
>http://www.copswiki.org/Common/TestVenue
>
>Help anyone?
>--Ray Lutz
>
>
>
>
>
>
>------------------------------------------------------------------------------
>One dashboard for servers and applications across
>Physical-Virtual-Cloud
>Widest out-of-the-box monitoring support with 50+ applications
>Performance metrics, stats and reports that give you Actionable
>Insights
>Deep dive visibility with transaction tracing using APM Insight.
>http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
>_______________________________________________
>Foswiki-discuss mailing list
>[hidden email]
>https://lists.sourceforge.net/lists/listinfo/foswiki-discuss

--
Sent from my Android phone with K-9 Mail. Please excuse my brevity.

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y


_______________________________________________
Foswiki-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/foswiki-discuss

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Foswiki-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/foswiki-discuss


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y


_______________________________________________
Foswiki-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/foswiki-discuss



------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y


_______________________________________________
Foswiki-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/foswiki-discuss



------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Foswiki-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/foswiki-discuss
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FORMFIELD strips out ! chars from data field.

Chris Hoefler
In reply to this post by Chris Hoefler
FYI,

From a brief glance at the code, (one of) the differences between FORMFIELD and QUERY is that FORMFIELD calls the Foswiki renderer,

sub FORMFIELD {
  <snip code to get topic meta object>
  return $this->renderer->renderFORMFIELD( $args, $topicObject );
}

whereas QUERY calls the Foswiki query parser, which ultimately pulls the value from Foswiki meta object directly,
sub QUERY {
  <snip code to get expr and setup recursion block>
  unless ($evalParser) {
      require Foswiki::Query::Parser;
      $evalParser = new Foswiki::Query::Parser();
  }
  $this->{evaluatingEval}->{$expr}++;
  try {
      my $node = $evalParser->parse($expr);
      $result = $node->evaluate( tom => $topicObject, data => $topicObject );
      my $fn = "_serialise_$style";
      $result = $this->$fn($result);
  }
  <snip error trapping code>
  return $result;
}


So, "fixing" the behavior of FORMFIELD will likely require a major change to the way it works. It is probably better to just use QUERY instead.



On Mon, May 18, 2015 at 11:42 AM, Chris Hoefler <[hidden email]> wrote:
Can you try your examples with QUERY instead of FORMFIELD?

Putting "Test!Sentence!with!embedded!exclamation!points!" into a form attached to the topic and pulling it back out with QUERY gives me this,

%QUERY{"MapURL"}%
Test!Sentence!with!embedded!exclamation!points!

And if you encode it you get this,
%ENCODE{"%QUERY{"MapURL"}%" old="!" new="%21"}%
Test%21Sentence%21with%21embedded%21exclamation%21points%21


As per the documentation, QUERY is recommended over FORMFIELD for most Data Form applications,
http://foswiki.org/System/VarQUERY



------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Foswiki-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/foswiki-discuss
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FORMFIELD strips out ! chars from data field.

Chris Hoefler
Well, I guess they did just do a major overhaul of FORMFIELD in trunk <slaps forehead>. It looks like it pulls the value directly from the meta object now,

    my $field = $formTopicObject->get( 'FIELD', $formField );
    if ($field) {
        my $name = $field->{name};
        my $title = $field->{title} || $name;
        $text = $formTopicObject->renderFormFieldForDisplay(
            $name, $format,
            {
                showhidden => 1,
                usetitle   => $field->{title}
            }
        );
        $text = $default unless length($text);
    }
    else {
        $text = $altText || '';
    }


On Mon, May 18, 2015 at 1:05 PM, Chris Hoefler <[hidden email]> wrote:
FYI,

From a brief glance at the code, (one of) the differences between FORMFIELD and QUERY is that FORMFIELD calls the Foswiki renderer,

sub FORMFIELD {
  <snip code to get topic meta object>
  return $this->renderer->renderFORMFIELD( $args, $topicObject );
}

whereas QUERY calls the Foswiki query parser, which ultimately pulls the value from Foswiki meta object directly,
sub QUERY {
  <snip code to get expr and setup recursion block>
  unless ($evalParser) {
      require Foswiki::Query::Parser;
      $evalParser = new Foswiki::Query::Parser();
  }
  $this->{evaluatingEval}->{$expr}++;
  try {
      my $node = $evalParser->parse($expr);
      $result = $node->evaluate( tom => $topicObject, data => $topicObject );
      my $fn = "_serialise_$style";
      $result = $this->$fn($result);
  }
  <snip error trapping code>
  return $result;
}


So, "fixing" the behavior of FORMFIELD will likely require a major change to the way it works. It is probably better to just use QUERY instead.




On Mon, May 18, 2015 at 11:42 AM, Chris Hoefler <[hidden email]> wrote:
Can you try your examples with QUERY instead of FORMFIELD?

Putting "Test!Sentence!with!embedded!exclamation!points!" into a form attached to the topic and pulling it back out with QUERY gives me this,

%QUERY{"MapURL"}%
Test!Sentence!with!embedded!exclamation!points!

And if you encode it you get this,
%ENCODE{"%QUERY{"MapURL"}%" old="!" new="%21"}%
Test%21Sentence%21with%21embedded%21exclamation%21points%21


As per the documentation, QUERY is recommended over FORMFIELD for most Data Form applications,
http://foswiki.org/System/VarQUERY





--
Chris Hoefler, PhD
Postdoctoral Research Associate
Straight Lab
Texas A&M University
2128 TAMU
College Station, TX 77843-2128

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Foswiki-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/foswiki-discuss
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FORMFIELD strips out ! chars from data field.

Raymond Lutz
In reply to this post by Chris Hoefler
We are getting closer!

Yeah, QUERY works for local fields! that's good to know. I will start to migrate to QUERY. That works even in 1.1.9 and is the best workaround for now for the local situation.
This issue is resolved as it was unique to 1.1.9 and is now fixed. So I am working to upgrade to the new version ASAP.

BUT this does not completely solve the problem, and I am not sure why. Long ago, I made it a policy to include a header in all data-base type topics.
So in this case, I have at the top of the topic:
%INCLUDE{"VenueTopicHeader"}%

And I modified VenueTopicHeader to use QUERY the way I thought it might work (QUERY does work if I paste it into the topic and use local field values). So far I haven't figured out the syntax to get to fields of the INCLUDINGTOPIC. No fields are inserted. I am guessing it is because the QUERY is perhaps executed prior to the INCLUDE... not sure. (I tried it also with out the topic="%INCLUDINGTOPIC%" and that does not work either, but interestingly, the %INCLUDINGTOPIC% is resolved correctly.

The following is VenueTopicHeader which is INCLUDE{}'ed in every venue topic. If I can change it and get it to work, then I don't have to change a gazillion other topics, at least that is the logic of using this included header...
-----------
---+ %TOPIC%

%STARTINCLUDE%
---+ %QUERY{"Name" topic="%INCLUDINGTOPIC%"}%

<noautolink>
%QUERY{"Address" topic="%INCLUDINGTOPIC%"}%, %QUERY{"CityStateZip" topic="%INCLUDINGTOPIC%"}%

%QUERY{"MapEmbed" topic="%INCLUDINGTOPIC%"}%
</noautolink>

%STOPINCLUDE%

%INCLUDE{VenueTopicFooter}%
-----------
Can anyone spot what i am doing wrong?
--Ray


On 2015-05-18 9:42 AM, Chris Hoefler wrote:
Can you try your examples with QUERY instead of FORMFIELD?

Putting "Test!Sentence!with!embedded!exclamation!points!" into a form attached to the topic and pulling it back out with QUERY gives me this,

%QUERY{"MapURL"}%
Test!Sentence!with!embedded!exclamation!points!

And if you encode it you get this,
%ENCODE{"%QUERY{"MapURL"}%" old="!" new="%21"}%
Test%21Sentence%21with%21embedded%21exclamation%21points%21


As per the documentation, QUERY is recommended over FORMFIELD for most Data Form applications,
http://foswiki.org/System/VarQUERY




------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y


_______________________________________________
Foswiki-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/foswiki-discuss


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Foswiki-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/foswiki-discuss
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FORMFIELD strips out ! chars from data field.

Chris Hoefler
I don't think QUERY supports a "topic" parameter. Instead you will have to do something like this,

%QUERY{"'%INCLUDINGTOPIC%'/fields.Name"}%

where the / syntax is to specify looking up the field value in a different topic. This is better explained, with examples, here,
http://foswiki.org/System/QuerySearch



On Mon, May 18, 2015 at 1:59 PM, Ray Lutz <[hidden email]> wrote:
We are getting closer!

Yeah, QUERY works for local fields! that's good to know. I will start to migrate to QUERY. That works even in 1.1.9 and is the best workaround for now for the local situation.
This issue is resolved as it was unique to 1.1.9 and is now fixed. So I am working to upgrade to the new version ASAP.

BUT this does not completely solve the problem, and I am not sure why. Long ago, I made it a policy to include a header in all data-base type topics.
So in this case, I have at the top of the topic:
%INCLUDE{"VenueTopicHeader"}%

And I modified VenueTopicHeader to use QUERY the way I thought it might work (QUERY does work if I paste it into the topic and use local field values). So far I haven't figured out the syntax to get to fields of the INCLUDINGTOPIC. No fields are inserted. I am guessing it is because the QUERY is perhaps executed prior to the INCLUDE... not sure. (I tried it also with out the topic="%INCLUDINGTOPIC%" and that does not work either, but interestingly, the %INCLUDINGTOPIC% is resolved correctly.

The following is VenueTopicHeader which is INCLUDE{}'ed in every venue topic. If I can change it and get it to work, then I don't have to change a gazillion other topics, at least that is the logic of using this included header...
-----------
---+ %TOPIC%

%STARTINCLUDE%
---+ %QUERY{"Name" topic="%INCLUDINGTOPIC%"}%

<noautolink>
%QUERY{"Address" topic="%INCLUDINGTOPIC%"}%, %QUERY{"CityStateZip" topic="%INCLUDINGTOPIC%"}%

%QUERY{"MapEmbed" topic="%INCLUDINGTOPIC%"}%
</noautolink>

%STOPINCLUDE%

%INCLUDE{VenueTopicFooter}%
-----------
Can anyone spot what i am doing wrong?
--Ray



On 2015-05-18 9:42 AM, Chris Hoefler wrote:
Can you try your examples with QUERY instead of FORMFIELD?

Putting "Test!Sentence!with!embedded!exclamation!points!" into a form attached to the topic and pulling it back out with QUERY gives me this,

%QUERY{"MapURL"}%
Test!Sentence!with!embedded!exclamation!points!

And if you encode it you get this,
%ENCODE{"%QUERY{"MapURL"}%" old="!" new="%21"}%
Test%21Sentence%21with%21embedded%21exclamation%21points%21


As per the documentation, QUERY is recommended over FORMFIELD for most Data Form applications,
http://foswiki.org/System/VarQUERY




------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y


_______________________________________________
Foswiki-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/foswiki-discuss


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Foswiki-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/foswiki-discuss




--
Chris Hoefler, PhD
Postdoctoral Research Associate
Straight Lab
Texas A&M University
2128 TAMU
College Station, TX 77843-2128

------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Foswiki-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/foswiki-discuss
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: FORMFIELD strips out ! chars from data field.

Raymond Lutz
BINGO! That works! Thank you for this sanity check!!
--Ray

On 2015-05-18 12:39 PM, Chris Hoefler wrote:
I don't think QUERY supports a "topic" parameter. Instead you will have to do something like this,

%QUERY{"'%INCLUDINGTOPIC%'/fields.Name"}%

where the / syntax is to specify looking up the field value in a different topic. This is better explained, with examples, here,
http://foswiki.org/System/QuerySearch



On Mon, May 18, 2015 at 1:59 PM, Ray Lutz <[hidden email]> wrote:
We are getting closer!

Yeah, QUERY works for local fields! that's good to know. I will start to migrate to QUERY. That works even in 1.1.9 and is the best workaround for now for the local situation.
This issue is resolved as it was unique to 1.1.9 and is now fixed. So I am working to upgrade to the new version ASAP.

BUT this does not completely solve the problem, and I am not sure why. Long ago, I made it a policy to include a header in all data-base type topics.
So in this case, I have at the top of the topic:
%INCLUDE{"VenueTopicHeader"}%

And I modified VenueTopicHeader to use QUERY the way I thought it might work (QUERY does work if I paste it into the topic and use local field values). So far I haven't figured out the syntax to get to fields of the INCLUDINGTOPIC. No fields are inserted. I am guessing it is because the QUERY is perhaps executed prior to the INCLUDE... not sure. (I tried it also with out the topic="%INCLUDINGTOPIC%" and that does not work either, but interestingly, the %INCLUDINGTOPIC% is resolved correctly.

The following is VenueTopicHeader which is INCLUDE{}'ed in every venue topic. If I can change it and get it to work, then I don't have to change a gazillion other topics, at least that is the logic of using this included header...
-----------
---+ %TOPIC%

%STARTINCLUDE%
---+ %QUERY{"Name" topic="%INCLUDINGTOPIC%"}%

<noautolink>
%QUERY{"Address" topic="%INCLUDINGTOPIC%"}%, %QUERY{"CityStateZip" topic="%INCLUDINGTOPIC%"}%

%QUERY{"MapEmbed" topic="%INCLUDINGTOPIC%"}%
</noautolink>

%STOPINCLUDE%

%INCLUDE{VenueTopicFooter}%
-----------
Can anyone spot what i am doing wrong?
--Ray



On 2015-05-18 9:42 AM, Chris Hoefler wrote:
Can you try your examples with QUERY instead of FORMFIELD?

Putting "Test!Sentence!with!embedded!exclamation!points!" into a form attached to the topic and pulling it back out with QUERY gives me this,

%QUERY{"MapURL"}%
Test!Sentence!with!embedded!exclamation!points!

And if you encode it you get this,
%ENCODE{"%QUERY{"MapURL"}%" old="!" new="%21"}%
Test%21Sentence%21with%21embedded%21exclamation%21points%21


As per the documentation, QUERY is recommended over FORMFIELD for most Data Form applications,
http://foswiki.org/System/VarQUERY




------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y


_______________________________________________
Foswiki-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/foswiki-discuss


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Foswiki-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/foswiki-discuss




--
Chris Hoefler, PhD
Postdoctoral Research Associate
Straight Lab
Texas A&M University
2128 TAMU
College Station, TX 77843-2128


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y


_______________________________________________
Foswiki-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/foswiki-discuss


------------------------------------------------------------------------------
One dashboard for servers and applications across Physical-Virtual-Cloud
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
_______________________________________________
Foswiki-discuss mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/foswiki-discuss
Loading...