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

refactoring, escaping and i18ning. #533

Merged
merged 1 commit into from
Apr 10, 2016
Merged

refactoring, escaping and i18ning. #533

merged 1 commit into from
Apr 10, 2016

Conversation

kmuto
Copy link
Owner

@kmuto kmuto commented Apr 10, 2016

EPUBMakerまわりの修正です。
名前の区切りに”,"を直接文字列で指定していた箇所をi18n.ymlのnamed_splitterの文字列に。
i18n文字列をそのままテンプレートに入れていた箇所をCGI.escapeHTMLするように。
そのほかif→unless、instance_of→kind_of、マージ時のdeep_merge利用です。

  • use i18n'd names_splitter string for splitting names (such as
    authors or contributors) in titlepage and colophon.
  • escape HTML tag of toctitle in toc file.
  • escape HTML tag of colophontitle and rights string in colophon file.
  • escape HTML tag of title in cover and titlepage.
  • use kind_of instead of instance_of.
  • use 'unless X' instead of 'if X.nil?' of one liner.
  • use deep_merge to merge epubmaker's default preset.
  • escape HTML tag of i18n'd part name.
  • add tests for HTML escaping.

 - use i18n'd names_splitter string for splitting names (such as
   authors or contributors) in titlepage and colophon.
 - escape HTML tag of toctitle in toc file.
 - escape HTML tag of colophontitle and rights string in colophon file.
 - escape HTML tag of title in cover and titlepage.
 - use kind_of instead of instance_of.
 - use 'unless X' instead of 'if X.nil?' of one liner.
 - use deep_merge to merge epubmaker's default preset.
 - escape HTML tag of i18n'd part name.
 - add tests for HTML escaping.
@kmuto kmuto merged commit a4b764e into master Apr 10, 2016
@kmuto
Copy link
Owner Author

kmuto commented Apr 10, 2016

このあとの改変作業が止まっちゃうので、とりあえずマージさせていただきました…。

@takahashim
Copy link
Collaborator

おー、なるほど。だいたいいいんではないかと思います

@takahashim takahashim deleted the escapehtml branch April 10, 2016 05:27
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.

2 participants