Avoid syntax issue in cloud notebooks (" _." converted to "_" and ".")?

I have found what I am certain is a bug in wolfram cloud. I generate the following code in Mathematica and then save it to the cloud.

Clear["Global`*"]
List@@Expand[(1+x)^6]/.a_. x^b_.->{b,a}

This initially runs correctly in the cloud notebook. But if I edit the notebook on the cloud, for example changing the exponent in the expansion from 6 to 7, then running the notebook results in a syntax error. I looked at the text on the cloud after editing the notebook and the
" ."
has been converted to separate objects,
"
" and “.”.

Thanks for the report! This is a cloud bug indeed. Incidentally, we’re already working on an overhaul of our client-side input tokenizer (where this is currently going wrong) that will fix this issue. I’ve still filed a bug ticket in our system (just for reference: CLOUD-15982).

As a workaround for now, you could use an explicit Optional wrapper, i.e.

Optional[a_]

instead of:

a_.

Thanks for the workaround suggestion Jan.