Skip to content

Strips iframe tags on ruby 2.1 #10

@PallaviTS

Description

@PallaviTS

@nono

2.0.0-p247 :061 > text = "<iframe width=640 height=360 src=//www.youtube.com/embed/WLIfmnlSkQ4?feature=player_detailpage frameborder=0 allowfullscreen></iframe>"
 => "<iframe width=640 height=360 src=//www.youtube.com/embed/WLIfmnlSkQ4?feature=player_detailpage frameborder=0 allowfullscreen></iframe>"
2.0.0-p247 :062 > HTML_Truncator.truncate(text, 2)
 => "<iframe width=\"640\" height=\"360\" src=\"//www.youtube.com/embed/WLIfmnlSkQ4?feature=player_detailpage\" frameborder=\"0\" allowfullscreen></iframe>"


2.1.0 :001 > text = "<iframe width=640 height=360 src=//www.youtube.com/embed/WLIfmnlSkQ4?feature=player_detailpage frameborder=0 allowfullscreen></iframe>"
 => "<iframe width=640 height=360 src=//www.youtube.com/embed/WLIfmnlSkQ4?feature=player_detailpage frameborder=0 allowfullscreen></iframe>"
2.1.0 :002 > HTML_Truncator.truncate(text, 2)
 => ""
2.1.0 :003 >

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions