Fix issue #359: Factors in HTML attributes are being converted to their numeric, not character, equivalent

This bug was introduced in 3fc1410. Essentially it boils down to the difference between stringifying a factor, and stringifying a list containing a factor:

> as.character(factor('a'))
[1] "a"
> as.character(list(factor('a')))
[1] "1"
The call to split that was introduced in this commit ends up generating lists of factors, not vectors of them.

The best fix I could find was to convert all the attribute values to character before doing the split.
Merge pull request #360 from jcheng5/bugfix/359-factors-as-numbers

Fix issue #359: Factors in HTML attributes are being converted to their numeric, not character, equivalent