这是indexloc提供的服务,不要输入任何密码
Skip to content

Document export fails when the document title contains Unicode characters #533

@blurfx

Description

@blurfx

What happened:

When a document title contains Unicode characters, the document export fails on the server side regardless of the export format (PDF, HTML, or Markdown).

Based on my research, it does not matter whether the workspace title or document content contains Unicode characters.

What you expected to happen:

The document should be exported.

How to reproduce it (as minimally and precisely as possible):

  1. Create a document with Unicode characters
  2. Export document in any format

Anything else we need to know?:

Environment:

  • Operating system:
  • Browser and version:
  • CodePair version:

Log from backend when document export fails.

WARN [ExpressAdapter] Content-Type doesn't match Reply body, you might need a custom ExceptionFilter for non-JSON responses
ERROR [ExceptionsHandler] Invalid character in header content ["Content-Disposition"]
TypeError [ERR_INVALID_CHAR]: Invalid character in header content ["Content-Disposition"]
    at ServerResponse.setHeader (node:_http_outgoing:658:3)
    at ExpressAdapter.reply (/prod/backend/node_modules/.pnpm/@nestjs+platform-express@10.4.5_@nestjs+common@10.4.5_class-transformer@0.5.1_class-validator_bgwuispj7r6sfbbt6o6grb2dai/node_modules/@nestjs/platform-express/adapters/express-adapter.js:41:26)
    at RouterResponseController.apply (/prod/backend/node_modules/.pnpm/@nestjs+core@10.4.5_@nestjs+common@10.4.5_class-transformer@0.5.1_class-validator@0.14.1_refl_sy6qwz4rdlchalmwcgdctfaeei/node_modules/@nestjs/core/router/router-response-controller.js:15:36)
    at /prod/backend/node_modules/.pnpm/@nestjs+core@10.4.5_@nestjs+common@10.4.5_class-transformer@0.5.1_class-validator@0.14.1_refl_sy6qwz4rdlchalmwcgdctfaeei/node_modules/@nestjs/core/router/router-execution-context.js:176:48
    at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
    at async /prod/backend/node_modules/.pnpm/@nestjs+core@10.4.5_@nestjs+common@10.4.5_class-transformer@0.5.1_class-validator@0.14.1_refl_sy6qwz4rdlchalmwcgdctfaeei/node_modules/@nestjs/core/router/router-execution-context.js:47:13
    at async /prod/backend/node_modules/.pnpm/@nestjs+core@10.4.5_@nestjs+common@10.4.5_class-transformer@0.5.1_class-validator@0.14.1_refl_sy6qwz4rdlchalmwcgdctfaeei/node_modules/@nestjs/core/router/router-proxy.js:9:17

note:
If #443 is resolved, this issue can be closed.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    Projects

    Status

    Backlog

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions