{"action":"opened","issue":{"url":"https://api.github.com/repos/gawel/pyquery/issues/97","labels_url":"https://api.github.com/repos/gawel/pyquery/issues/97/labels{/name}","comments_url":"https://api.github.com/repos/gawel/pyquery/issues/97/comments","events_url":"https://api.github.com/repos/gawel/pyquery/issues/97/events","html_url":"https://github.com/gawel/pyquery/issues/97","id":57400177,"number":97,"title":"replaceWith() messes with entities","user":{"login":"tuxor1337","id":1518387,"avatar_url":"https://avatars.githubusercontent.com/u/1518387?v=3","gravatar_id":"","url":"https://api.github.com/users/tuxor1337","html_url":"https://github.com/tuxor1337","followers_url":"https://api.github.com/users/tuxor1337/followers","following_url":"https://api.github.com/users/tuxor1337/following{/other_user}","gists_url":"https://api.github.com/users/tuxor1337/gists{/gist_id}","starred_url":"https://api.github.com/users/tuxor1337/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tuxor1337/subscriptions","organizations_url":"https://api.github.com/users/tuxor1337/orgs","repos_url":"https://api.github.com/users/tuxor1337/repos","events_url":"https://api.github.com/users/tuxor1337/events{/privacy}","received_events_url":"https://api.github.com/users/tuxor1337/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-02-12T00:33:06Z","updated_at":"2015-02-12T00:33:06Z","closed_at":null,"body":"Just noted this:\r\n\r\n    >>> d = PyQuery(\"<p/>&lt;b\")\r\n    >>> d(\"p\").replaceWith(\"a\")\r\n    [<p>]\r\n    >>> d.outerHtml()\r\n    u'<div>a<b></b></div>'\r\n\r\nSo the `&lt;` entity is translated to `<` and suddenly there's a new `<b/>` element and stuff is getting really weird...\r\n"}}