easywebhub / tasks

List of tasks for EasyWeb members
1 stars 4 forks source link

Metalsmith build error with page source #96

Open baotnq opened 6 years ago

baotnq commented 6 years ago
<img src="//c.o0bg.com/rf/image_150x150/Boston/Library/Contributors/Caricatures/mcohen.png" alt="In this image obtained from the US Department of Defense, US sailors aboard Arleigh Burke-class guided-missile destroyer USS Sterett prepare to moor at Naval Base Guam for a scheduled port visit on August 4, 2017. US Defense Secretary Jim Mattis warned North Korea on August 9, 2017, that it would be "grossly" outmatched in any conflict with the US, telling Pyongyang to stop considering any action that risked 
    "the destruction of its people". / AFP PHOTO / US NAVY / Byron C. Linder / RESTRICTED TO EDITORIAL USE - MANDATORY CREDIT "AFP PHOTO / US Navy / Mass Communication Specialist 1st Class Byron C. Linder" - NO MARKETING NO ADVERTISING CAMPAIGNS - DISTRIBUTED AS A SERVICE TO CLIENTS BYRON C. LINDER/AFP/Getty Images" />
    <h3 class="hed-cat">

How to fix

nemesisqp commented 6 years ago

mấy cai html entities đó phải escape mà " -> &quo; còn nếu là content value thì handlebar mặc định nó escape rồi

baotnq commented 6 years ago

có cách nào, hoặc tools nào convert page source sang dạng escape để bỏ vào metalsmith ko bị lỗi không ku? chứ giờ phải đi xoá bằng tay từng chỗ vậy thì hơi bị đuối.

nemesisqp commented 6 years ago

anh search online escape html entities là ra nhiều online web tool, tiện thì như mấy cái ide auto escape on paste nhưng sẽ có lúc gặp double escape