Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

title can't contain character "\'" #25

Closed
Deturium opened this issue Dec 5, 2019 · 1 comment
Closed

title can't contain character "\'" #25

Deturium opened this issue Dec 5, 2019 · 1 comment

Comments

@Deturium
Copy link
Contributor

Deturium commented Dec 5, 2019

The father doc‘s escape work is WTF.
: (

@Deturium
Copy link
Contributor Author

Deturium commented Dec 5, 2019

export default {
  doc: {
    title: "father's doc",   // notice we have a ' here
  },
}

Then you will get crash like this:

image

ᕙ(⇀‸↼‵‵)ᕗ


This problem is happended at umi-plugin-father-doc/src/index.ts#L95

I try to fix this bug by the way but failed.

Both opts.title.replace('\'', '\\'') and escapeHTML(opts.title) can't slove the problem.


I'm too tired, so there is no PR but issue leave to you. : )

@Deturium Deturium changed the title fix title can't contain character "\'" Dec 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants