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

Patch comment #713

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Patch comment #713

wants to merge 2 commits into from

Conversation

hycinth22
Copy link

@hycinth22 hycinth22 commented Feb 15, 2018

  1. fix: 评论传入的url错误

url_for()生成的是当前页面跳转到参数path的相对路径,不能用来直接拼接完整url。
如:

  • 当前页面是/post/xxx,url_for('/post/aaa')的返回值就会是aaa
    直接拿来拼接就会产生http://host/aaa的错误链接
  • 当前页面是/post/xxx,url_for('/post/xxx')的返回值就会是空字符串
    直接拿来拼接就会产生http://host/的错误链接

应当使用permallink属性得到完整url

  1. 分离disqus到独立文件
    与支持的其他评论系统一样单独成文件,模块化

url_for()生成的是当前页面到path的相对路径,不能用来直接拼接完整url。
使用permallink属性得到完整url
与支持的其他评论系统一样并行,单独成文件
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant