Users - Quotation marks in product names

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
bjc
Reply | Threaded
Open this post in threaded view
|

Users - Quotation marks in product names

bjc
Often-times, the particular subset of a company or brand's product  
line, or a specific style name that distinguishes a product, is found  
in quotation marks.  For example, a furniture store has styles for  
living room sets with names like "Hollywood", "Broadway",  
"Producer".  It just doesn't look right if it's not in quotes.

However, when I try to put these quotation marks in my Product Name  
field in the lower portion of the Content page for my product,  
everything starting with first quotation mark is silently chopped off.

Is this the intended behavior?  What possible rationale could there  
be for this?  A name is just a string, right?

If not, where do I have to go to fix it - customize the entity  
definition?  The entity engine itself?

And should this really be silent if it is the intended behavior?  
Some unsuspecting administrator would be extremely confused by this -  
I just happen to be a programmer ;-)

Thanks,

   Ben
 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Users - Quotation marks in product names

David E. Jones

Ben,

Chances are it has nothing to do with the Entity Engine or any other part of OFBiz, but rather has to do with how the browser interprets the text. To verify this you can take a look at the HTML generated by the server and see what the text looks like, and compare that to how the browser renders it.

If my guess is right there are 2 possible solutions to this:

1. use " instead of the "
2. we could change the templates to transform the text into an HTML friendly form; we should probably do this... it is most easily done using the ?html built-in in FreeMarker

-David


Benjamin Cox wrote:

> Often-times, the particular subset of a company or brand's product  
> line, or a specific style name that distinguishes a product, is found  
> in quotation marks.  For example, a furniture store has styles for  
> living room sets with names like "Hollywood", "Broadway",  
> "Producer".  It just doesn't look right if it's not in quotes.
>
> However, when I try to put these quotation marks in my Product Name  
> field in the lower portion of the Content page for my product,  
> everything starting with first quotation mark is silently chopped off.
>
> Is this the intended behavior?  What possible rationale could there  
> be for this?  A name is just a string, right?
>
> If not, where do I have to go to fix it - customize the entity  
> definition?  The entity engine itself?
>
> And should this really be silent if it is the intended behavior?  
> Some unsuspecting administrator would be extremely confused by this -  
> I just happen to be a programmer ;-)
>
> Thanks,
>
>    Ben
>  
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/users
 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
bjc
Reply | Threaded
Open this post in threaded view
|

Re: Users - Quotation marks in product names

bjc
David,

I sure appreciate the rapid response (my, you're up early!).

Asking my customer to do " may be asking for trouble, so my vote  
would be #2.  In fact, that seems like a good default approach for  
just about anything the browser may be asked to render.  Or is there  
some risk associated with that?

I'll update my current copy for now, of course.  For the permanent  
handling - should I file a JIRA report, or do you have a moment to  
slam this one down now?

Thanks,
    Ben


On Apr 30, 2006, at 4:13 AM, David E Jones wrote:

>
> Ben,
>
> Chances are it has nothing to do with the Entity Engine or any  
> other part of OFBiz, but rather has to do with how the browser  
> interprets the text. To verify this you can take a look at the HTML  
> generated by the server and see what the text looks like, and  
> compare that to how the browser renders it.
>
> If my guess is right there are 2 possible solutions to this:
>
> 1. use " instead of the "
> 2. we could change the templates to transform the text into an HTML  
> friendly form; we should probably do this... it is most easily done  
> using the ?html built-in in FreeMarker
>
> -David
>
>
> Benjamin Cox wrote:
>> Often-times, the particular subset of a company or brand's product
>> line, or a specific style name that distinguishes a product, is found
>> in quotation marks.  For example, a furniture store has styles for
>> living room sets with names like "Hollywood", "Broadway",
>> "Producer".  It just doesn't look right if it's not in quotes.
>>
>> However, when I try to put these quotation marks in my Product Name
>> field in the lower portion of the Content page for my product,
>> everything starting with first quotation mark is silently chopped  
>> off.
>>
>> Is this the intended behavior?  What possible rationale could there
>> be for this?  A name is just a string, right?
>>
>> If not, where do I have to go to fix it - customize the entity
>> definition?  The entity engine itself?
>>
>> And should this really be silent if it is the intended behavior?
>> Some unsuspecting administrator would be extremely confused by this -
>> I just happen to be a programmer ;-)
>>
>> Thanks,
>>
>>    Ben
>>
>> _______________________________________________
>> Users mailing list
>> [hidden email]
>> http://lists.ofbiz.org/mailman/listinfo/users
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/users

 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
Reply | Threaded
Open this post in threaded view
|

Re: Users - Quotation marks in product names

David E. Jones

Actually, I'm in the UK right now (in the middle of a 2 week on-site visit), so it's a bit after noon and I still haven't left the hotel room today...

Yes, a Jira issue would be a good place to put this for now. As you work through it if you could keep a list of files that need changing, or perhaps attach a patch, that will help us a lot to get it in place.

The only concern I have with this is backward compatibility for those that have started escaping their special characters (ie using something like "). They will end up with something not too desirable, but I guess it's not hard to change those to the real characters where needed, and for large catalogs that can be done automatically with a service that looks for them anyway. So, yeah, it's probably fine to put this change in the default ecommerce and other templates.

-David


Benjamin Cox wrote:

> David,
>
> I sure appreciate the rapid response (my, you're up early!).
>
> Asking my customer to do " may be asking for trouble, so my vote  
> would be #2.  In fact, that seems like a good default approach for  
> just about anything the browser may be asked to render.  Or is there  
> some risk associated with that?
>
> I'll update my current copy for now, of course.  For the permanent  
> handling - should I file a JIRA report, or do you have a moment to  
> slam this one down now?
>
> Thanks,
>     Ben
>
>
> On Apr 30, 2006, at 4:13 AM, David E Jones wrote:
>
>> Ben,
>>
>> Chances are it has nothing to do with the Entity Engine or any  
>> other part of OFBiz, but rather has to do with how the browser  
>> interprets the text. To verify this you can take a look at the HTML  
>> generated by the server and see what the text looks like, and  
>> compare that to how the browser renders it.
>>
>> If my guess is right there are 2 possible solutions to this:
>>
>> 1. use " instead of the "
>> 2. we could change the templates to transform the text into an HTML  
>> friendly form; we should probably do this... it is most easily done  
>> using the ?html built-in in FreeMarker
>>
>> -David
>>
>>
>> Benjamin Cox wrote:
>>> Often-times, the particular subset of a company or brand's product
>>> line, or a specific style name that distinguishes a product, is found
>>> in quotation marks.  For example, a furniture store has styles for
>>> living room sets with names like "Hollywood", "Broadway",
>>> "Producer".  It just doesn't look right if it's not in quotes.
>>>
>>> However, when I try to put these quotation marks in my Product Name
>>> field in the lower portion of the Content page for my product,
>>> everything starting with first quotation mark is silently chopped  
>>> off.
>>>
>>> Is this the intended behavior?  What possible rationale could there
>>> be for this?  A name is just a string, right?
>>>
>>> If not, where do I have to go to fix it - customize the entity
>>> definition?  The entity engine itself?
>>>
>>> And should this really be silent if it is the intended behavior?
>>> Some unsuspecting administrator would be extremely confused by this -
>>> I just happen to be a programmer ;-)
>>>
>>> Thanks,
>>>
>>>    Ben
>>>
>>> _______________________________________________
>>> Users mailing list
>>> [hidden email]
>>> http://lists.ofbiz.org/mailman/listinfo/users
>> _______________________________________________
>> Users mailing list
>> [hidden email]
>> http://lists.ofbiz.org/mailman/listinfo/users
>
>  
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/users
 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users
bjc
Reply | Threaded
Open this post in threaded view
|

Re: Users - Quotation marks in product names

bjc
Filed at:   http://jira.undersunconsulting.com/browse/OFBIZ-869.  I  
listed this as an Improvement, rather than a Bug.

Once it was clarified that it was the HTML doing the chopping,  
answer I realized that I could do single quotes, which may be good  
enough for my customer in this context.   So we have a workaround for  
now...  we may not get time in the near future to circle back around  
and start cleaning these up.  If someone else beats us to it, that'd  
be great!

Just to clarify, it's not the ecommerce templates that need this,  
it's the catalog templates.  The first time you put it in, it shows  
up on the ecommerce side without a hitch.  However, if you go to the  
product's Content page it's chopped off in the form field.  If you  
click Update without typing those words in again, that's how they get  
erased from the field.

Thanks,

   Ben


On Apr 30, 2006, at 4:30 AM, David E Jones wrote:

>
> Actually, I'm in the UK right now (in the middle of a 2 week on-
> site visit), so it's a bit after noon and I still haven't left the  
> hotel room today...
>
> Yes, a Jira issue would be a good place to put this for now. As you  
> work through it if you could keep a list of files that need  
> changing, or perhaps attach a patch, that will help us a lot to get  
> it in place.
>
> The only concern I have with this is backward compatibility for  
> those that have started escaping their special characters (ie using  
> something like "). They will end up with something not too  
> desirable, but I guess it's not hard to change those to the real  
> characters where needed, and for large catalogs that can be done  
> automatically with a service that looks for them anyway. So, yeah,  
> it's probably fine to put this change in the default ecommerce and  
> other templates.
>
> -David
>
>
> Benjamin Cox wrote:
>> David,
>>
>> I sure appreciate the rapid response (my, you're up early!).
>>
>> Asking my customer to do " may be asking for trouble, so my vote
>> would be #2.  In fact, that seems like a good default approach for
>> just about anything the browser may be asked to render.  Or is there
>> some risk associated with that?
>>
>> I'll update my current copy for now, of course.  For the permanent
>> handling - should I file a JIRA report, or do you have a moment to
>> slam this one down now?
>>
>> Thanks,
>>     Ben
>>
>>
>> On Apr 30, 2006, at 4:13 AM, David E Jones wrote:
>>
>>> Ben,
>>>
>>> Chances are it has nothing to do with the Entity Engine or any
>>> other part of OFBiz, but rather has to do with how the browser
>>> interprets the text. To verify this you can take a look at the HTML
>>> generated by the server and see what the text looks like, and
>>> compare that to how the browser renders it.
>>>
>>> If my guess is right there are 2 possible solutions to this:
>>>
>>> 1. use " instead of the "
>>> 2. we could change the templates to transform the text into an HTML
>>> friendly form; we should probably do this... it is most easily done
>>> using the ?html built-in in FreeMarker
>>>
>>> -David
>>>
>>>
>>> Benjamin Cox wrote:
>>>> Often-times, the particular subset of a company or brand's product
>>>> line, or a specific style name that distinguishes a product, is  
>>>> found
>>>> in quotation marks.  For example, a furniture store has styles for
>>>> living room sets with names like "Hollywood", "Broadway",
>>>> "Producer".  It just doesn't look right if it's not in quotes.
>>>>
>>>> However, when I try to put these quotation marks in my Product Name
>>>> field in the lower portion of the Content page for my product,
>>>> everything starting with first quotation mark is silently chopped
>>>> off.
>>>>
>>>> Is this the intended behavior?  What possible rationale could there
>>>> be for this?  A name is just a string, right?
>>>>
>>>> If not, where do I have to go to fix it - customize the entity
>>>> definition?  The entity engine itself?
>>>>
>>>> And should this really be silent if it is the intended behavior?
>>>> Some unsuspecting administrator would be extremely confused by  
>>>> this -
>>>> I just happen to be a programmer ;-)
>>>>
>>>> Thanks,
>>>>
>>>>    Ben
>>>>
>>>> _______________________________________________
>>>> Users mailing list
>>>> [hidden email]
>>>> http://lists.ofbiz.org/mailman/listinfo/users
>>> _______________________________________________
>>> Users mailing list
>>> [hidden email]
>>> http://lists.ofbiz.org/mailman/listinfo/users
>>
>>
>> _______________________________________________
>> Users mailing list
>> [hidden email]
>> http://lists.ofbiz.org/mailman/listinfo/users
>
> _______________________________________________
> Users mailing list
> [hidden email]
> http://lists.ofbiz.org/mailman/listinfo/users

 
_______________________________________________
Users mailing list
[hidden email]
http://lists.ofbiz.org/mailman/listinfo/users