For example, if you copy the buffer from IE looks one at a time, and if you copy something from a page through Chrome, then the HTML in the buffer will look different => you may need to process it differently due to browser features.
Simply, the program should get into the buffer and pull out the Html from there, and then process it.