PILLUTLAAVINASH / google-enterprise-connector-manager

Automatically exported from code.google.com/p/google-enterprise-connector-manager
0 stars 0 forks source link

Encode invalid URL characters in property names #150

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Property names should be munged to convert characters that would have to be
URL-encoded to underscores. For example, "File Type" becomes "File_Type".
The rationale is to avoid the need to URL-encode the names during
searching, for example, "inmeta:File%20Type=text%2Fhtml".

Spaces need to be encoded. Other characters need to be as well, including
slashes and colons. For a starting point, see:

http://code.google.com/apis/searchappliance/documentation/46/xml_reference.html#
appendix_url_escaping

We should make sure that you do not have to URL-encode underscores when
using inmeta, or we need to find another character (or no character, i.e.,
drop the offending characters completely) for the replacement text.

This work is mildly related to issue 128, which might reasonably be done at
the same time.

Original issue reported on code.google.com by jl1615@gmail.com on 1 May 2009 at 11:02

GoogleCodeExporter commented 8 years ago

Original comment by mgron...@gmail.com on 6 May 2009 at 9:37

GoogleCodeExporter commented 8 years ago
This breaks the google: property names, such as google:lastmodified, which 
would be munged to 
google_lastmodified. That might have been a better choice to begin with, 
although the use of colon for a 
namespace is well established. No good reason to change that now. Some 
connectors already expose spaces 
and other characters that require URL-encoding, which would also break with 
this change.

I think that URL-encoding in the GSA metadata operators is just a fact of life, 
and mangling the connector 
property names to avoid the URL-encoding may be well-intentioned, but I think 
it's a patch. No other element 
of the GSA modifies metadata names like this. One overall goal we have is to 
integrate the connectors more 
tightly with the GSA, and this seems opposed to that. Marked as WontFix.

Original comment by jl1615@gmail.com on 15 May 2009 at 9:46