};
+int
+chxj_is_jreserved_tag(const char *src)
+{
+ int ii;
+ for (ii=0;ii<RESERVED_NELT;ii++) {
+ if (STRCASEEQ(reserved_table[ii].lower,
+ reserved_table[ii].upper,
+ reserved_table[ii].name,
+ src)) {
+ return 1;
+ }
+ }
+ return 0;
+}
+
char *
chxj_jreserved_to_safe_tag(request_rec *r, const char *src, chxjconvrule_entry *entryp)
{
s++;
fname = apr_pstrdup(pool, result);
result = NULL;
-
- char *pstat;
+
+ char *pstat;
char *pstat2;
for (;;) {
char *pair = NULL;
- if (xmlflag) {
- pair = apr_strtok(s, "&", &pstat);
- }
- else {
- pair = apr_strtok(s, "&", &pstat);
- }
+ pair = apr_strtok(s, "&", &pstat);
+
if (! pair) break;
s = NULL;
+
+ if(strncasecmp(pair,"amp;",4) == 0){
+ pair += 4;
+ }
+
char *key = apr_strtok(pair, "=", &pstat2);
char *val = "";
if (key) {
val = apr_strtok(NULL, "=", &pstat2);
+
if (!val) val = "";
}
char *tmp = NULL;
if (strcasecmp(key, "guid") == 0) {
tmp = apr_psprintf(pool, "%s=%s", key, val);
if (result) {
- result = apr_pstrcat(pool, result, "&" ,tmp, NULL);
+ if(xmlflag)
+ result = apr_pstrcat(pool, result, "&" ,tmp, NULL);
+ else
+ result = apr_pstrcat(pool, result, "&" ,tmp, NULL);
}
else {
result = tmp;