https://bugzilla.wikimedia.org/show_bug.cgi?id=65786

            Bug ID: 65786
           Summary: string value input with whitespace or return
                    characters
           Product: MediaWiki extensions
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: Unprioritized
         Component: WikidataRepo
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
       Web browser: ---
   Mobile Platform: ---

i am entering string values and sometimes they get submitted to the api for
save as''fsfs\n' and 'fsfs ' with trailing spaces or return characters, and
then get 'malformed input' errors and can't save.

for example:

api.php?action=wbformatvalue&format=json&datavalue=%7B%22value%22%3A%22fsfs++%22%2C%22type%22%3A%22string%22%7D&options=%7B%7D&datatype=string&generate=text%2Fplain

action:wbsetclaim
format:json
claim:{"type":"statement","mainsnak":{"snaktype":"value","property":"P18","datavalue":{"type":"string","value":"fsfs

"}},"id":"Q300$838e49d4-4ea0-4d57-b036-d40631678425","qualifiers":{},"qualifiers-order":[],"rank":"normal"}


or:

api.php?action=wbformatvalue&format=json&datavalue=%7B%22value%22%3A%22fsfs%5Cn%22%2C%22type%22%3A%22string%22%7D&options=%7B%7D&datatype=string&generate=text%2Fplain

action:wbsetclaim
format:json
claim:{"type":"statement","mainsnak":{"snaktype":"value","property":"P18","datavalue":{"type":"string","value":"fsfs\n"}},"id":"Q300$838e49d4-4ea0-4d57-b036-d40631678425","qualifiers":{},"qualifiers-order":[],"rank":"normal"}

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.
_______________________________________________
Wikidata-bugs mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs

Reply via email to