Using regular expressions to remove relative path slashes
- by Adam Carlile
Hey Guys
I am trying to remove all the relative image path slashes from a chunk of HTML that contains several other elements.
For example
<img src="../../../../images/upload/1/test.jpg />
would need to become
<img src="http://s3.amazonaws.com/website/images/upload/1/test.jpg" />
I was thinking of writing this as a rails helper,…