hono 3.3.2 → 3.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapter/bun/serve-static.js +2 -0
- package/dist/adapter/cloudflare-pages/handler.js +12 -1
- package/dist/adapter/cloudflare-pages/index.js +3 -2
- package/dist/adapter/cloudflare-workers/serve-static.js +2 -0
- package/dist/adapter/deno/serve-static.js +2 -0
- package/dist/adapter/lambda-edge/handler.js +24 -22
- package/dist/cjs/adapter/bun/serve-static.js +2 -0
- package/dist/cjs/adapter/cloudflare-pages/handler.js +14 -2
- package/dist/cjs/adapter/cloudflare-pages/index.js +4 -2
- package/dist/cjs/adapter/cloudflare-workers/serve-static.js +2 -0
- package/dist/cjs/adapter/deno/serve-static.js +2 -0
- package/dist/cjs/adapter/lambda-edge/handler.js +24 -22
- package/dist/cjs/hono-base.js +1 -1
- package/dist/cjs/utils/filepath.js +2 -0
- package/dist/cjs/utils/html.js +4 -1
- package/dist/hono-base.js +1 -1
- package/dist/types/adapter/aws-lambda/handler.d.ts +2 -1
- package/dist/types/adapter/bun/serve-static.d.ts +1 -1
- package/dist/types/adapter/cloudflare-pages/handler.d.ts +8 -1
- package/dist/types/adapter/cloudflare-pages/index.d.ts +1 -1
- package/dist/types/adapter/deno/serve-static.d.ts +1 -1
- package/dist/types/adapter/lambda-edge/handler.d.ts +7 -5
- package/dist/types/adapter/lambda-edge/index.d.ts +1 -1
- package/dist/types/utils/filepath.d.ts +1 -1
- package/dist/utils/filepath.js +2 -0
- package/dist/utils/html.js +4 -1
- package/package.json +1 -1
|
@@ -11,6 +11,17 @@ var handle = (subApp, path) => (eventContext) => {
|
|
|
11
11
|
}
|
|
12
12
|
);
|
|
13
13
|
};
|
|
14
|
+
var serveStatic = () => {
|
|
15
|
+
return async (c) => {
|
|
16
|
+
const env = c.env;
|
|
17
|
+
const res = await env.ASSETS.fetch(c.req.raw);
|
|
18
|
+
if (res.status === 404) {
|
|
19
|
+
return c.notFound();
|
|
20
|
+
}
|
|
21
|
+
return res;
|
|
22
|
+
};
|
|
23
|
+
};
|
|
14
24
|
export {
|
|
15
|
-
handle
|
|
25
|
+
handle,
|
|
26
|
+
serveStatic
|
|
16
27
|
};
|
|
@@ -16,6 +16,8 @@ var serveStatic = (options = { root: "" }) => {
|
|
|
16
16
|
root: options.root,
|
|
17
17
|
defaultDocument: DEFAULT_DOCUMENT
|
|
18
18
|
});
|
|
19
|
+
if (!path)
|
|
20
|
+
return await next();
|
|
19
21
|
const content = await getContentFromKVAsset(path, {
|
|
20
22
|
manifest: options.manifest,
|
|
21
23
|
namespace: options.namespace ? options.namespace : c.env ? c.env.__STATIC_CONTENT : void 0
|
|
@@ -2,14 +2,24 @@
|
|
|
2
2
|
import crypto from "crypto";
|
|
3
3
|
import { encodeBase64 } from "../../utils/encode.js";
|
|
4
4
|
globalThis.crypto ?? (globalThis.crypto = crypto);
|
|
5
|
+
var convertHeaders = (headers) => {
|
|
6
|
+
const cfHeaders = {};
|
|
7
|
+
headers.forEach((value, key) => {
|
|
8
|
+
cfHeaders[key.toLowerCase()] = [{ key: key.toLowerCase(), value }];
|
|
9
|
+
});
|
|
10
|
+
return cfHeaders;
|
|
11
|
+
};
|
|
5
12
|
var handle = (app) => {
|
|
6
13
|
return async (event, context, callback) => {
|
|
7
|
-
const
|
|
8
|
-
const res = await app.fetch(req, {
|
|
14
|
+
const res = await app.fetch(createRequest(event), {
|
|
9
15
|
event,
|
|
10
16
|
context,
|
|
11
|
-
callback,
|
|
12
|
-
|
|
17
|
+
callback: (err, result) => {
|
|
18
|
+
callback?.(err, result);
|
|
19
|
+
},
|
|
20
|
+
config: event.Records[0].cf.config,
|
|
21
|
+
request: event.Records[0].cf.request,
|
|
22
|
+
response: event.Records[0].cf.response
|
|
13
23
|
});
|
|
14
24
|
return createResult(res);
|
|
15
25
|
};
|
|
@@ -17,35 +27,27 @@ var handle = (app) => {
|
|
|
17
27
|
var createResult = async (res) => {
|
|
18
28
|
const isBase64Encoded = isContentTypeBinary(res.headers.get("content-type") || "");
|
|
19
29
|
const body = isBase64Encoded ? encodeBase64(await res.arrayBuffer()) : await res.text();
|
|
20
|
-
const headers = {};
|
|
21
|
-
res.headers.forEach((value, key) => {
|
|
22
|
-
headers[key.toLowerCase()] = [{ key: key.toLowerCase(), value }];
|
|
23
|
-
});
|
|
24
30
|
return {
|
|
25
31
|
status: res.status.toString(),
|
|
26
|
-
headers,
|
|
32
|
+
headers: convertHeaders(res.headers),
|
|
27
33
|
body
|
|
28
34
|
};
|
|
29
35
|
};
|
|
30
36
|
var createRequest = (event) => {
|
|
31
|
-
const queryString =
|
|
37
|
+
const queryString = event.Records[0].cf.request.querystring;
|
|
32
38
|
const urlPath = `https://${event.Records[0].cf.config.distributionDomainName}${event.Records[0].cf.request.uri}`;
|
|
33
39
|
const url = queryString ? `${urlPath}?${queryString}` : urlPath;
|
|
34
40
|
const headers = new Headers();
|
|
35
|
-
|
|
41
|
+
Object.entries(event.Records[0].cf.request.headers).forEach(([k, v]) => {
|
|
36
42
|
v.forEach((header) => headers.set(k, header.value));
|
|
37
|
-
}
|
|
38
|
-
const method = event.Records[0].cf.request.method;
|
|
39
|
-
const requestInit = {
|
|
40
|
-
headers,
|
|
41
|
-
method
|
|
42
|
-
};
|
|
43
|
+
});
|
|
43
44
|
const requestBody = event.Records[0].cf.request.body;
|
|
44
|
-
|
|
45
|
-
return new Request(url,
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
const body = requestBody?.encoding === "base64" && requestBody?.data ? Buffer.from(requestBody.data, "base64") : requestBody?.data;
|
|
46
|
+
return new Request(url, {
|
|
47
|
+
headers,
|
|
48
|
+
method: event.Records[0].cf.request.method,
|
|
49
|
+
body
|
|
50
|
+
});
|
|
49
51
|
};
|
|
50
52
|
var isContentTypeBinary = (contentType) => {
|
|
51
53
|
return !/^(text\/(plain|html|css|javascript|csv).*|application\/(.*json|.*xml).*|image\/svg\+xml)$/.test(
|
|
@@ -18,7 +18,8 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var handler_exports = {};
|
|
20
20
|
__export(handler_exports, {
|
|
21
|
-
handle: () => handle
|
|
21
|
+
handle: () => handle,
|
|
22
|
+
serveStatic: () => serveStatic
|
|
22
23
|
});
|
|
23
24
|
module.exports = __toCommonJS(handler_exports);
|
|
24
25
|
var import_hono = require("../../hono");
|
|
@@ -33,7 +34,18 @@ const handle = (subApp, path) => (eventContext) => {
|
|
|
33
34
|
}
|
|
34
35
|
);
|
|
35
36
|
};
|
|
37
|
+
const serveStatic = () => {
|
|
38
|
+
return async (c) => {
|
|
39
|
+
const env = c.env;
|
|
40
|
+
const res = await env.ASSETS.fetch(c.req.raw);
|
|
41
|
+
if (res.status === 404) {
|
|
42
|
+
return c.notFound();
|
|
43
|
+
}
|
|
44
|
+
return res;
|
|
45
|
+
};
|
|
46
|
+
};
|
|
36
47
|
// Annotate the CommonJS export names for ESM import in node:
|
|
37
48
|
0 && (module.exports = {
|
|
38
|
-
handle
|
|
49
|
+
handle,
|
|
50
|
+
serveStatic
|
|
39
51
|
});
|
|
@@ -18,11 +18,13 @@ var __copyProps = (to, from, except, desc) => {
|
|
|
18
18
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
19
|
var cloudflare_pages_exports = {};
|
|
20
20
|
__export(cloudflare_pages_exports, {
|
|
21
|
-
handle: () => import_handler.handle
|
|
21
|
+
handle: () => import_handler.handle,
|
|
22
|
+
serveStatic: () => import_handler.serveStatic
|
|
22
23
|
});
|
|
23
24
|
module.exports = __toCommonJS(cloudflare_pages_exports);
|
|
24
25
|
var import_handler = require("./handler");
|
|
25
26
|
// Annotate the CommonJS export names for ESM import in node:
|
|
26
27
|
0 && (module.exports = {
|
|
27
|
-
handle
|
|
28
|
+
handle,
|
|
29
|
+
serveStatic
|
|
28
30
|
});
|
|
@@ -38,6 +38,8 @@ const serveStatic = (options = { root: "" }) => {
|
|
|
38
38
|
root: options.root,
|
|
39
39
|
defaultDocument: DEFAULT_DOCUMENT
|
|
40
40
|
});
|
|
41
|
+
if (!path)
|
|
42
|
+
return await next();
|
|
41
43
|
const content = await (0, import_cloudflare.getContentFromKVAsset)(path, {
|
|
42
44
|
manifest: options.manifest,
|
|
43
45
|
namespace: options.namespace ? options.namespace : c.env ? c.env.__STATIC_CONTENT : void 0
|
|
@@ -31,14 +31,24 @@ module.exports = __toCommonJS(handler_exports);
|
|
|
31
31
|
var import_crypto = __toESM(require("crypto"), 1);
|
|
32
32
|
var import_encode = require("../../utils/encode");
|
|
33
33
|
globalThis.crypto ?? (globalThis.crypto = import_crypto.default);
|
|
34
|
+
const convertHeaders = (headers) => {
|
|
35
|
+
const cfHeaders = {};
|
|
36
|
+
headers.forEach((value, key) => {
|
|
37
|
+
cfHeaders[key.toLowerCase()] = [{ key: key.toLowerCase(), value }];
|
|
38
|
+
});
|
|
39
|
+
return cfHeaders;
|
|
40
|
+
};
|
|
34
41
|
const handle = (app) => {
|
|
35
42
|
return async (event, context, callback) => {
|
|
36
|
-
const
|
|
37
|
-
const res = await app.fetch(req, {
|
|
43
|
+
const res = await app.fetch(createRequest(event), {
|
|
38
44
|
event,
|
|
39
45
|
context,
|
|
40
|
-
callback,
|
|
41
|
-
|
|
46
|
+
callback: (err, result) => {
|
|
47
|
+
callback?.(err, result);
|
|
48
|
+
},
|
|
49
|
+
config: event.Records[0].cf.config,
|
|
50
|
+
request: event.Records[0].cf.request,
|
|
51
|
+
response: event.Records[0].cf.response
|
|
42
52
|
});
|
|
43
53
|
return createResult(res);
|
|
44
54
|
};
|
|
@@ -46,35 +56,27 @@ const handle = (app) => {
|
|
|
46
56
|
const createResult = async (res) => {
|
|
47
57
|
const isBase64Encoded = isContentTypeBinary(res.headers.get("content-type") || "");
|
|
48
58
|
const body = isBase64Encoded ? (0, import_encode.encodeBase64)(await res.arrayBuffer()) : await res.text();
|
|
49
|
-
const headers = {};
|
|
50
|
-
res.headers.forEach((value, key) => {
|
|
51
|
-
headers[key.toLowerCase()] = [{ key: key.toLowerCase(), value }];
|
|
52
|
-
});
|
|
53
59
|
return {
|
|
54
60
|
status: res.status.toString(),
|
|
55
|
-
headers,
|
|
61
|
+
headers: convertHeaders(res.headers),
|
|
56
62
|
body
|
|
57
63
|
};
|
|
58
64
|
};
|
|
59
65
|
const createRequest = (event) => {
|
|
60
|
-
const queryString =
|
|
66
|
+
const queryString = event.Records[0].cf.request.querystring;
|
|
61
67
|
const urlPath = `https://${event.Records[0].cf.config.distributionDomainName}${event.Records[0].cf.request.uri}`;
|
|
62
68
|
const url = queryString ? `${urlPath}?${queryString}` : urlPath;
|
|
63
69
|
const headers = new Headers();
|
|
64
|
-
|
|
70
|
+
Object.entries(event.Records[0].cf.request.headers).forEach(([k, v]) => {
|
|
65
71
|
v.forEach((header) => headers.set(k, header.value));
|
|
66
|
-
}
|
|
67
|
-
const method = event.Records[0].cf.request.method;
|
|
68
|
-
const requestInit = {
|
|
69
|
-
headers,
|
|
70
|
-
method
|
|
71
|
-
};
|
|
72
|
+
});
|
|
72
73
|
const requestBody = event.Records[0].cf.request.body;
|
|
73
|
-
|
|
74
|
-
return new Request(url,
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
74
|
+
const body = requestBody?.encoding === "base64" && requestBody?.data ? Buffer.from(requestBody.data, "base64") : requestBody?.data;
|
|
75
|
+
return new Request(url, {
|
|
76
|
+
headers,
|
|
77
|
+
method: event.Records[0].cf.request.method,
|
|
78
|
+
body
|
|
79
|
+
});
|
|
78
80
|
};
|
|
79
81
|
const isContentTypeBinary = (contentType) => {
|
|
80
82
|
return !/^(text\/(plain|html|css|javascript|csv).*|application\/(.*json|.*xml).*|image\/svg\+xml)$/.test(
|
package/dist/cjs/hono-base.js
CHANGED
|
@@ -117,7 +117,7 @@ class Hono extends defineDynamicClass() {
|
|
|
117
117
|
const strict = init.strict ?? true;
|
|
118
118
|
delete init.strict;
|
|
119
119
|
Object.assign(this, init);
|
|
120
|
-
this.getPath
|
|
120
|
+
this.getPath = strict ? init.getPath ?? import_url.getPath : import_url.getPathNoStrict;
|
|
121
121
|
}
|
|
122
122
|
clone() {
|
|
123
123
|
const clone = new Hono({
|
|
@@ -23,6 +23,8 @@ __export(filepath_exports, {
|
|
|
23
23
|
module.exports = __toCommonJS(filepath_exports);
|
|
24
24
|
const getFilePath = (options) => {
|
|
25
25
|
let filename = options.filename;
|
|
26
|
+
if (/(?:^|\/)\.\.(?:$|\/)/.test(filename))
|
|
27
|
+
return;
|
|
26
28
|
let root = options.root || "";
|
|
27
29
|
const defaultDocument = options.defaultDocument || "index.html";
|
|
28
30
|
if (filename.endsWith("/")) {
|
package/dist/cjs/utils/html.js
CHANGED
|
@@ -21,7 +21,7 @@ __export(html_exports, {
|
|
|
21
21
|
escapeToBuffer: () => escapeToBuffer
|
|
22
22
|
});
|
|
23
23
|
module.exports = __toCommonJS(html_exports);
|
|
24
|
-
const escapeRe = /[&<>"]/;
|
|
24
|
+
const escapeRe = /[&<>'"]/;
|
|
25
25
|
const escapeToBuffer = (str, buffer) => {
|
|
26
26
|
const match = str.search(escapeRe);
|
|
27
27
|
if (match === -1) {
|
|
@@ -36,6 +36,9 @@ const escapeToBuffer = (str, buffer) => {
|
|
|
36
36
|
case 34:
|
|
37
37
|
escape = """;
|
|
38
38
|
break;
|
|
39
|
+
case 39:
|
|
40
|
+
escape = "'";
|
|
41
|
+
break;
|
|
39
42
|
case 38:
|
|
40
43
|
escape = "&";
|
|
41
44
|
break;
|
package/dist/hono-base.js
CHANGED
|
@@ -95,7 +95,7 @@ var Hono = class extends defineDynamicClass() {
|
|
|
95
95
|
const strict = init.strict ?? true;
|
|
96
96
|
delete init.strict;
|
|
97
97
|
Object.assign(this, init);
|
|
98
|
-
this.getPath
|
|
98
|
+
this.getPath = strict ? init.getPath ?? getPath : getPathNoStrict;
|
|
99
99
|
}
|
|
100
100
|
clone() {
|
|
101
101
|
const clone = new Hono({
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { Hono } from '../../hono';
|
|
2
|
+
import type { Env } from '../../types';
|
|
2
3
|
interface APIGatewayProxyEventV2 {
|
|
3
4
|
httpMethod: string;
|
|
4
5
|
headers: Record<string, string | undefined>;
|
|
@@ -43,6 +44,6 @@ interface APIGatewayProxyResult {
|
|
|
43
44
|
/**
|
|
44
45
|
* Accepts events from API Gateway/ELB(`APIGatewayProxyEvent`) and directly through Function Url(`APIGatewayProxyEventV2`)
|
|
45
46
|
*/
|
|
46
|
-
export declare const handle: (app: Hono) => (event: APIGatewayProxyEvent | APIGatewayProxyEventV2 | LambdaFunctionUrlEvent) => Promise<APIGatewayProxyResult>;
|
|
47
|
+
export declare const handle: <E extends Env = Env, S = {}, BasePath extends string = "/">(app: Hono<E, S, BasePath>) => (event: APIGatewayProxyEvent | APIGatewayProxyEventV2 | LambdaFunctionUrlEvent) => Promise<APIGatewayProxyResult>;
|
|
47
48
|
export declare const isContentTypeBinary: (contentType: string) => boolean;
|
|
48
49
|
export {};
|
|
@@ -5,4 +5,4 @@ export declare type ServeStaticOptions = {
|
|
|
5
5
|
path?: string;
|
|
6
6
|
rewriteRequestPath?: (path: string) => string;
|
|
7
7
|
};
|
|
8
|
-
export declare const serveStatic: (options?: ServeStaticOptions) => (c: Context, next: Next) => Promise<
|
|
8
|
+
export declare const serveStatic: (options?: ServeStaticOptions) => (c: Context, next: Next) => Promise<void | Response>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Hono } from '../../hono';
|
|
2
|
-
import type { Env } from '../../types';
|
|
2
|
+
import type { Env, MiddlewareHandler } from '../../types';
|
|
3
3
|
declare type Params<P extends string = any> = Record<P, string | string[]>;
|
|
4
4
|
export declare type EventContext<Env = {}, P extends string = any, Data = {}> = {
|
|
5
5
|
request: Request;
|
|
@@ -24,4 +24,11 @@ interface HandleInterface {
|
|
|
24
24
|
<E extends Env, S extends {}, BasePath extends string>(app: Hono<E, S, BasePath>, path: string): (eventContext: EventContext) => Response | Promise<Response>;
|
|
25
25
|
}
|
|
26
26
|
export declare const handle: HandleInterface;
|
|
27
|
+
/**
|
|
28
|
+
*
|
|
29
|
+
* @description `serveStatic()` is for advanced mode:
|
|
30
|
+
* https://developers.cloudflare.com/pages/platform/functions/advanced-mode/#set-up-a-function
|
|
31
|
+
*
|
|
32
|
+
*/
|
|
33
|
+
export declare const serveStatic: () => MiddlewareHandler;
|
|
27
34
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { handle } from './handler';
|
|
1
|
+
export { handle, serveStatic } from './handler';
|
|
2
2
|
export type { EventContext } from './handler';
|
|
@@ -5,4 +5,4 @@ export declare type ServeStaticOptions = {
|
|
|
5
5
|
path?: string;
|
|
6
6
|
rewriteRequestPath?: (path: string) => string;
|
|
7
7
|
};
|
|
8
|
-
export declare const serveStatic: (options?: ServeStaticOptions) => (c: Context, next: Next) => Promise<
|
|
8
|
+
export declare const serveStatic: (options?: ServeStaticOptions) => (c: Context, next: Next) => Promise<void | Response>;
|
|
@@ -32,7 +32,12 @@ export interface CloudFrontRequest {
|
|
|
32
32
|
custom: CloudFrontCustomOrigin;
|
|
33
33
|
};
|
|
34
34
|
}
|
|
35
|
-
interface
|
|
35
|
+
export interface CloudFrontResponse {
|
|
36
|
+
headers: CloudFrontHeaders;
|
|
37
|
+
status: string;
|
|
38
|
+
statusDescription?: string;
|
|
39
|
+
}
|
|
40
|
+
export interface CloudFrontConfig {
|
|
36
41
|
distributionDomainName: string;
|
|
37
42
|
distributionId: string;
|
|
38
43
|
eventType: string;
|
|
@@ -42,6 +47,7 @@ interface CloudFrontEvent {
|
|
|
42
47
|
cf: {
|
|
43
48
|
config: CloudFrontConfig;
|
|
44
49
|
request: CloudFrontRequest;
|
|
50
|
+
response?: CloudFrontResponse;
|
|
45
51
|
};
|
|
46
52
|
}
|
|
47
53
|
export interface CloudFrontEdgeEvent {
|
|
@@ -63,10 +69,6 @@ interface CloudFrontResult {
|
|
|
63
69
|
body?: string;
|
|
64
70
|
bodyEncoding?: 'text' | 'base64';
|
|
65
71
|
}
|
|
66
|
-
/**
|
|
67
|
-
* Accepts events from 'Lambda@Edge' event
|
|
68
|
-
* https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/lambda-event-structure.html
|
|
69
|
-
*/
|
|
70
72
|
export declare const handle: (app: Hono<any>) => (event: CloudFrontEdgeEvent, context?: CloudFrontContext, callback?: Callback) => Promise<CloudFrontResult>;
|
|
71
73
|
export declare const isContentTypeBinary: (contentType: string) => boolean;
|
|
72
74
|
export {};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
export { handle } from './handler';
|
|
2
|
-
export type { Callback, CloudFrontRequest, CloudFrontEdgeEvent } from './handler';
|
|
2
|
+
export type { Callback, CloudFrontConfig, CloudFrontRequest, CloudFrontResponse, CloudFrontEdgeEvent } from './handler';
|
package/dist/utils/filepath.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
// src/utils/filepath.ts
|
|
2
2
|
var getFilePath = (options) => {
|
|
3
3
|
let filename = options.filename;
|
|
4
|
+
if (/(?:^|\/)\.\.(?:$|\/)/.test(filename))
|
|
5
|
+
return;
|
|
4
6
|
let root = options.root || "";
|
|
5
7
|
const defaultDocument = options.defaultDocument || "index.html";
|
|
6
8
|
if (filename.endsWith("/")) {
|
package/dist/utils/html.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/utils/html.ts
|
|
2
|
-
var escapeRe = /[&<>"]/;
|
|
2
|
+
var escapeRe = /[&<>'"]/;
|
|
3
3
|
var escapeToBuffer = (str, buffer) => {
|
|
4
4
|
const match = str.search(escapeRe);
|
|
5
5
|
if (match === -1) {
|
|
@@ -14,6 +14,9 @@ var escapeToBuffer = (str, buffer) => {
|
|
|
14
14
|
case 34:
|
|
15
15
|
escape = """;
|
|
16
16
|
break;
|
|
17
|
+
case 39:
|
|
18
|
+
escape = "'";
|
|
19
|
+
break;
|
|
17
20
|
case 38:
|
|
18
21
|
escape = "&";
|
|
19
22
|
break;
|