{"action":"created","issue":{"url":"https://api.github.com/repos/salesagility/SuiteCRM/issues/6126","repository_url":"https://api.github.com/repos/salesagility/SuiteCRM","labels_url":"https://api.github.com/repos/salesagility/SuiteCRM/issues/6126/labels{/name}","comments_url":"https://api.github.com/repos/salesagility/SuiteCRM/issues/6126/comments","events_url":"https://api.github.com/repos/salesagility/SuiteCRM/issues/6126/events","html_url":"https://github.com/salesagility/SuiteCRM/issues/6126","id":338563745,"node_id":"MDU6SXNzdWUzMzg1NjM3NDU=","number":6126,"title":"If field value contains single quote, on each save CRM will treat this field as a changed","user":{"login":"re8260","id":18328936,"node_id":"MDQ6VXNlcjE4MzI4OTM2","avatar_url":"https://avatars3.githubusercontent.com/u/18328936?v=4","gravatar_id":"","url":"https://api.github.com/users/re8260","html_url":"https://github.com/re8260","followers_url":"https://api.github.com/users/re8260/followers","following_url":"https://api.github.com/users/re8260/following{/other_user}","gists_url":"https://api.github.com/users/re8260/gists{/gist_id}","starred_url":"https://api.github.com/users/re8260/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/re8260/subscriptions","organizations_url":"https://api.github.com/users/re8260/orgs","repos_url":"https://api.github.com/users/re8260/repos","events_url":"https://api.github.com/users/re8260/events{/privacy}","received_events_url":"https://api.github.com/users/re8260/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-05T12:58:04Z","updated_at":"2018-07-05T13:15:08Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"<!--- Provide a general summary of the issue in the **Title** above -->\r\n<!--- Before you open an issue, please check if a similar issue already exists or has been closed before. --->\r\n<!--- If you have discovered a security risk please report it by emailing security@suitecrm.com. This will be delivered to the product team who handle security issues. Please don't disclose security bugs publicly until they have been handled by the security team. --->\r\n\r\n#### Issue\r\nIf field value contains single quote, on each save CRM will treat this field as a changed even if the value was not changed.\r\n\r\n#### Expected Behavior\r\nIf value was not changed, nothing should happen.\r\n\r\n#### Actual Behavior\r\n1. Run all Workflows with condition Any Change on this field.\r\n1. Add new line to bean change log, same value before and after\r\n![image](https://user-images.githubusercontent.com/18328936/42324296-8107921e-806b-11e8-8cc8-72d93390700f.png)\r\n![image](https://user-images.githubusercontent.com/18328936/42324326-94ec0ec2-806b-11e8-8e21-5afde0077abf.png)\r\n\r\n\r\n#### Possible Fix\r\nThe problem happen because the prev value from $bean->fetched_row['name'] in encoded as html and actual value is not encoded so they will nevet be same : `R'oman` vs `R&#039;oman`\r\n![image](https://user-images.githubusercontent.com/18328936/42323745-dddb149a-8069-11e8-8c4f-657f9dd50f62.png)\r\n\r\n\r\n#### Steps to Reproduce\r\n<!--- Provide a link to a live example, or an unambiguous set of steps to -->\r\n<!--- reproduce this bug include code to reproduce, if relevant -->\r\n1. Create Account with  single quote in name\r\n2. Create WorkFlow with condition AnyChange on Account name field\r\n3. Open and save bean with chnages\r\n4. in result, new line will be added to change-log and Workflow will be trigger\r\n\r\n#### Context\r\n[lint to test Workflow 89c58469-90fc-c629-a607-5b3e14312651](https://demo.suiteondemand.com/index.php?module=AOW_WorkFlow&action=DetailView&record=89c58469-90fc-c629-a607-5b3e14312651)\r\n[link to test account bean 3dedfaf4-8387-91ce-7113-5b3e0c9f6119](https://demo.suiteondemand.com/index.php?action=ajaxui#ajaxUILoc=index.php%3Fmodule%3DAccounts%26action%3DDetailView%26record%3D3dedfaf4-8387-91ce-7113-5b3e0c9f6119) \r\n\r\nhigh priority\r\n\r\n#### Your Environment\r\nDemo Envierment Version 7.10.7\r\nhttps://demo.suiteondemand.com\r\n"},"comment":{"url":"https://api.github.com/repos/salesagility/SuiteCRM/issues/comments/402717808","html_url":"https://github.com/salesagility/SuiteCRM/issues/6126#issuecomment-402717808","issue_url":"https://api.github.com/repos/salesagility/SuiteCRM/issues/6126","id":402717808,"node_id":"MDEyOklzc3VlQ29tbWVudDQwMjcxNzgwOA==","user":{"login":"gunnicom","id":550251,"node_id":"MDQ6VXNlcjU1MDI1MQ==","avatar_url":"https://avatars2.githubusercontent.com/u/550251?v=4","gravatar_id":"","url":"https://api.github.com/users/gunnicom","html_url":"https://github.com/gunnicom","followers_url":"https://api.github.com/users/gunnicom/followers","following_url":"https://api.github.com/users/gunnicom/following{/other_user}","gists_url":"https://api.github.com/users/gunnicom/gists{/gist_id}","starred_url":"https://api.github.com/users/gunnicom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gunnicom/subscriptions","organizations_url":"https://api.github.com/users/gunnicom/orgs","repos_url":"https://api.github.com/users/gunnicom/repos","events_url":"https://api.github.com/users/gunnicom/events{/privacy}","received_events_url":"https://api.github.com/users/gunnicom/received_events","type":"User","site_admin":false},"created_at":"2018-07-05T13:15:08Z","updated_at":"2018-07-05T13:15:08Z","author_association":"CONTRIBUTOR","body":"Maybe this one:\r\nhttps://github.com/salesagility/SuiteCRM/pull/1094"}}
{"actor":{"display_login":"gunnicom"}}