Changeset 409


Ignore:
Timestamp:
Jun 24, 2016, 1:27:44 PM (3 years ago)
Author:
lars@…
Message:

Can disable URLFilter for descendats of object class "no-urlify"

Location:
www
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • www/content/anrw/2016/program.haml

    r408 r409  
    1717  The ANRW ‘16 is being recorded and
    1818  %a{ :href => "http://www.meetecho.com/ietf96/anrw/" } live-streamed.
    19   The recordings, along with the full text of all papers, will 
     19  The recordings, along with the full text of all papers, will
    2020  be made available on this page after the event.
    2121
     
    4444
    4545- json = "content/anrw/2016/anrw16-data.json"
    46 %table.table.table-striped
     46%table.table.table-striped.no-urlify
    4747  %thead
    4848    %tr
  • www/lib/filter_url.rb

    r398 r409  
    9696    @@urls.keys.sort_by {|x| x.length}.reverse.each do |tag|
    9797      doc = Nokogiri::HTML(c)
    98       elements = doc.xpath('//text()') - doc.xpath('//a/text()')
     98      elements = doc.xpath('//*[local-name() != "a" and not(ancestor::*[contains(concat(" ", normalize-space(@class), " "), " no-urlify ")])]/text()')
    9999      elements.each do |element|
    100100        element.content = element.content.gsub(/\b(#{tag})\b/) {
Note: See TracChangeset for help on using the changeset viewer.