Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. XML / XSL
  4. xsl highlight function breaking html tags

xsl highlight function breaking html tags

Scheduled Pinned Locked Moved XML / XSL
tutorialhtmlcommcpxml
2 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • W Offline
    W Offline
    werD
    wrote on last edited by
    #1

    hello, Ive come across a highlight function that i was able to add to a search feature i have on a page. however the current method it uses will wrap text that is found even inside of html so its making the tags no longer work. has anyone dealt with this type of thing before? here's the highlighter template example of problem $text = Simple steps to walkthrough $what = walk output=[Simple steps to walkthrough](http://www.<font style...>walk</font>throughs.com) Id appreciate any insight on this. i thought that perhaps i could examine for an unclosed < in before variable and unopened > in after but im not sure what the best way to do this would be Thanks in advance werD, MCP

    W 1 Reply Last reply
    0
    • W werD

      hello, Ive come across a highlight function that i was able to add to a search feature i have on a page. however the current method it uses will wrap text that is found even inside of html so its making the tags no longer work. has anyone dealt with this type of thing before? here's the highlighter template example of problem $text = Simple steps to walkthrough $what = walk output=[Simple steps to walkthrough](http://www.<font style...>walk</font>throughs.com) Id appreciate any insight on this. i thought that perhaps i could examine for an unclosed < in before variable and unopened > in after but im not sure what the best way to do this would be Thanks in advance werD, MCP

      W Offline
      W Offline
      werD
      wrote on last edited by
      #2

      this is what im thinking. the higlighter template uses before term and after so $text = Simple steps to walkthrough $what = walk before1 = [Simple steps to walkthrough](http://www.
      term1 = walk
      after1 =throughs.com) im thinking that i can use a reverse function and have before1rev = .www//:ptth"=ferh a< after1rev = >a/"moc.shguorht i was thinking i could run some logic off of that to get an intended result but now im just dizzy :S any thoughts? CODE /\ - here's the reverse function im using CODE

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups